Hi
I'm currenty trying to make sure all our vbscrips work properly under win7 before deploying win7 throughout the company.
I'm having a bit of bother!
As an example using a very basic vbs (an example from the web but has the same problem)...
dim objItem, colItems, strComputer
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Proxy")
For Each objItem in colItems
Wscript.Echo "Proxy Port Number: " & objItem.ProxyPortNumber
Wscript.Echo "Proxy Server: " & objItem.ProxyServer
Wscript.Echo "Server Name: " & objItem.ServerName
Wscript.Echo
Next
This runs as expected on winXP. On win7 I get a Windows Script host error...
Script: example.vbs
line: 5
Char: 1
Error: 0x80041010
Code: 80041010
Source: (null)
Has anyone had this error and found a solution?
Thanks for your time!
I'm currenty trying to make sure all our vbscrips work properly under win7 before deploying win7 throughout the company.
I'm having a bit of bother!

As an example using a very basic vbs (an example from the web but has the same problem)...
dim objItem, colItems, strComputer
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Proxy")
For Each objItem in colItems
Wscript.Echo "Proxy Port Number: " & objItem.ProxyPortNumber
Wscript.Echo "Proxy Server: " & objItem.ProxyServer
Wscript.Echo "Server Name: " & objItem.ServerName
Wscript.Echo
Next
This runs as expected on winXP. On win7 I get a Windows Script host error...
Script: example.vbs
line: 5
Char: 1
Error: 0x80041010
Code: 80041010
Source: (null)
Has anyone had this error and found a solution?
Thanks for your time!