Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

StdRegProv - SWbemServices error '80041002' NOT FOUND

321 views
Skip to first unread message

Blake

unread,
Feb 3, 2003, 7:57:33 PM2/3/03
to
Hi,
I'm trying to connect to a remote registry and use
StdRegProv provider to read a list of softwares
installed. However I keep getting an error when it gets
to the StdRegProv line. The server I'm trying to read the
registry from is a NT 4.0 server with service pack 6. I
know that server does have WMI installed cause I can
execute other WMI classes and capture information.
Here is the code that I have:

sInstApps = InstalledApplications(strcomputer)

Function InstalledApplications(node)
Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE

Set objSWbemLocator2 = CreateObject
("WbemScripting.SWbemLocator")
Set oSvc = objSWbemLocator2.ConnectServer
(strcomputer,"root\default",domain,password)
Set oRegistry = oSvc.Get("StdRegProv") <--ERROR
sBaseKey
= "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
iRC = oRegistry.EnumKey(HKLM, sBaseKey, arSubKeys)
count = 1
For Each sKey In arSubKeys
iRC = oRegistry.GetStringValue( _
HKLM, sBaseKey & sKey, "DisplayName", sValue)
If iRC <> 0 Then
oRegistry.GetStringValue _
HKLM, sBaseKey & sKey, "QuietDisplayName", sValue
End If
If sValue <> "" Then
InstalledApplications = _
InstalledApplications & sValue & vbCrLf
End If
If sValue <> "" Then
response.write sValue
count = count + 1

end if
Next
End Function

Philip Nunn [MSFT]

unread,
Feb 3, 2003, 8:45:11 PM2/3/03
to
The script looks ok I think. Have you verified that the class is actually
there on the remote machine using wbemtest? If the class isn't there you
may need to "mofcomp regevent.mof" in the wbem folder to install the class.

--
-Philip

This posting is provided "As Is" with no warranties, and confers no rights.
"Blake" <blak...@yahoo.com> wrote in message
news:033101c2cbe8$66be3d70$d7f82ecf@TK2MSFTNGXA14...

blake

unread,
Feb 4, 2003, 2:06:50 AM2/4/03
to
I'm able to connect to the remote machine using
webemtest. How do I verify if the registry class is there
and also which is the class that I need to look for.

Thanks
Blake

>.
>

blake

unread,
Feb 4, 2003, 2:13:33 AM2/4/03
to
I checked the remote machine and was not able to open
StdRegProv class. I went ahead and ran "mofcomp
regevent.mof" and it registered successfully. However I'm
still getting the error StdRegProv Not found.
Any other suggesstions.

Thanks.

>.
>

Philip Nunn [MSFT]

unread,
Feb 4, 2003, 2:16:52 PM2/4/03
to
Using wbemtest, connect to root\default of the remote machine.
(\\<remote_machine>\root\default or just root\default if your phyically on
the remote machine already.) Click the EnumClasses button, leave the edit
field blank and click OK. You should see the StdRegProv class in the
enumeration.

Alternatively you can click OpenClass, type StdRegProv and hit OK. It
should open a window displaying the class. If you get 'not found', then the
class is missing.

Compiling regevent.mof should create this class.
--
-Philip

This posting is provided "As Is" with no warranties, and confers no rights.

"blake" <blak...@yahoo.com> wrote in message
news:009a01c2cc1c$ed2d8850$8af82ecf@TK2MSFTNGXA03...

Blake

unread,
Feb 4, 2003, 3:00:05 PM2/4/03
to
Sure enough, StdRegProv is not listed as one of the
classes.
I copied the file regevent.mof from another server with
the same service pack and rang mofcomp regevent.mof again
and this time it registered the class but when I run my
query now I get the following error:

SWbemObject error '8004100c'

Not supported

What does this mean.

Thanks again..

>.
>

Philip Nunn [MSFT]

unread,
Feb 5, 2003, 1:10:30 PM2/5/03
to
This ran fine on my NT 4 Sp6 box.

Can you tell what version of WMI is installed (maybe start
%windir%\system32\hwbem\wbemcntl.exe to see)?

Also, on what line are you getting this error?

--
-Philip

This posting is provided "As Is" with no warranties, and confers no rights.
"Blake" <blak...@yahoo.com> wrote in message

news:080901c2cc88$02fabac0$8df82ecf@TK2MSFTNGXA02...

0 new messages