WMI and 2003 SP1

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
 
T

Torgeir Bakken \(MVP\)

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top