VBScript does not work on XP (acpi)?

View: New views
1 Messages — Rating Filter:   Alert me  

VBScript does not work on XP (acpi)?

by hepek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This VBScript I run on xp but I get error "(null): 0x8004100C" on "For each" - line .
Do I need enable some thing or what ???

********************************

strServer = "."

Set objWMI = GetObject("winmgmts://" & strServer & "/root\WMI")
Set objInstances = objWMI.InstancesOf("MSAcpi",48)

For Each objInstance in objInstances
   WScript.Echo objInstance.getObjectText_
Next

********************************

Thank you