WMI and 2003 SP1

  • Thread starter Thread starter Tom Ker
  • Start date Start date
T

Tom Ker

This is part of a script I run on multiple versions of Windows....

Set oWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
sCompName & "\root\cimv2")
Set cOperatingSystems = oWMIService.ExecQuery("Select * from
Win32_OperatingSystem")
For Each oOperatingSystems in cOperatingSystems
wscript.echo oOperatingSystems.Caption
Next

This works on Windows 2000 (all SPs), Windows XP (all SPs), and Windows
2003, but does not work on Windows 2003 SP1. I get an error 8004101D with
no other explanation on the "For Each..." line. Or I get an error 80010108
with "The object invoked has disconnected from its clients." on the same
line. I get the same results whether sCompName contains "." or the actual
ComputerName.

Any thoughts?

Thanks,

Tom
 
Tom said:
This is part of a script I run on multiple versions of Windows....

Set oWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
sCompName & "\root\cimv2")
Set cOperatingSystems = oWMIService.ExecQuery("Select * from
Win32_OperatingSystem")
For Each oOperatingSystems in cOperatingSystems
wscript.echo oOperatingSystems.Caption
Next

This works on Windows 2000 (all SPs), Windows XP (all SPs), and Windows
2003, but does not work on Windows 2003 SP1. I get an error 8004101D with
no other explanation on the "For Each..." line. Or I get an error 80010108
with "The object invoked has disconnected from its clients." on the same
line. I get the same results whether sCompName contains "." or the actual
ComputerName.

Any thoughts?
Hi

For me, your script runs fine on a Win2k3 Server box where SP1 is
installed.
 
Back
Top