Rudif
2007-05-11 11:32:00 UTC
Hello MVPs and all
On launching the vbs script shown below on my computer, I get this error
H:\Sandbox\WMI\vbs\GetBIOSVer-4.vbs(11, 1) SWbemLocator: Access is denied.
My computer is on a domain, while "targetcomputer" is in a workgroup.
"targetcomputeruser" is a local user on "targetcomputer", member of
Administrators group.
Both computers run XP SP2.
Is it possible at all to obtain WMI access in this situation (domain ->
workgroup)?
If yes, what do I need to configure on computers and/or modify in my script ?
I searched msdn and forums and other WMI-related websites for advice, but
what I could find and try did not solve my problem.
I ran WMIDiag.vbs on the target computer and it declared 'Success'.
TIA
Rudif
'----------------------------------------------------------
computer = "targetcomputer"
user = "targetcomputeruser"
password = "targetcomputeruserpwd"
'GetBIOSVer.vbs
'Retrieves the BIOS information from remote computer
Dim ojLocator, objbWMI, colBIOS, clsBIOS
Set objLocator=CreateObject("WbemScripting.SWbemLocator")
Set objWMI=objLocator.ConnectServer(computer, "root\cimv2", user, password)
objWMI.Security_.ImpersonationLevel=3 'Impersonate
Set colBIOS=objWMI.InstancesOf("Win32_BIOS")
For Each clsBIOS in colBIOS
Wscript.Echo "Name: " & clsBIOS.Name
WScript.Echo "SMBIOSBIOSVersion: " & clsBIOS.SMBIOSBIOSVersion
WScript.Echo "SMBIOSMajorVersion: " & clsBIOS.SMBIOSMajorVersion
WScript.Echo "SMBIOSMinorVersion: " & clsBIOS.SMBIOSMinorVersion
Next
'----------------------------------------------------------
On launching the vbs script shown below on my computer, I get this error
H:\Sandbox\WMI\vbs\GetBIOSVer-4.vbs(11, 1) SWbemLocator: Access is denied.
My computer is on a domain, while "targetcomputer" is in a workgroup.
"targetcomputeruser" is a local user on "targetcomputer", member of
Administrators group.
Both computers run XP SP2.
Is it possible at all to obtain WMI access in this situation (domain ->
workgroup)?
If yes, what do I need to configure on computers and/or modify in my script ?
I searched msdn and forums and other WMI-related websites for advice, but
what I could find and try did not solve my problem.
I ran WMIDiag.vbs on the target computer and it declared 'Success'.
TIA
Rudif
'----------------------------------------------------------
computer = "targetcomputer"
user = "targetcomputeruser"
password = "targetcomputeruserpwd"
'GetBIOSVer.vbs
'Retrieves the BIOS information from remote computer
Dim ojLocator, objbWMI, colBIOS, clsBIOS
Set objLocator=CreateObject("WbemScripting.SWbemLocator")
Set objWMI=objLocator.ConnectServer(computer, "root\cimv2", user, password)
objWMI.Security_.ImpersonationLevel=3 'Impersonate
Set colBIOS=objWMI.InstancesOf("Win32_BIOS")
For Each clsBIOS in colBIOS
Wscript.Echo "Name: " & clsBIOS.Name
WScript.Echo "SMBIOSBIOSVersion: " & clsBIOS.SMBIOSBIOSVersion
WScript.Echo "SMBIOSMajorVersion: " & clsBIOS.SMBIOSMajorVersion
WScript.Echo "SMBIOSMinorVersion: " & clsBIOS.SMBIOSMinorVersion
Next
'----------------------------------------------------------