G
Guest
Guest
Archived from groups: microsoft.public.windowsxp.general (More info?)
I have found the following sample script on a scripting site. When I attempt
to run the script I get an error message:
Specified window "objWMIService = GetObject("winmgmts:" _" Not Present
Any susequent key sends in script may cause exceptions.
The Set colFolders = objWMIService.ExecQuery fails with a similar fault.
Anyone have any suggestions as how to fix this?
Regards
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colFolders = objWMIService.ExecQuery _
("Select * from Win32_Directory where name = 'c:\\temp'")
For Each objFolder in colFolders
errResults = objFolder.Compress
Next
I have found the following sample script on a scripting site. When I attempt
to run the script I get an error message:
Specified window "objWMIService = GetObject("winmgmts:" _" Not Present
Any susequent key sends in script may cause exceptions.
The Set colFolders = objWMIService.ExecQuery fails with a similar fault.
Anyone have any suggestions as how to fix this?
Regards
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colFolders = objWMIService.ExecQuery _
("Select * from Win32_Directory where name = 'c:\\temp'")
For Each objFolder in colFolders
errResults = objFolder.Compress
Next