script error

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I have try to run the script on a remote computer, but it return the
error... any idea what's wrong? I can confirm that the remote computer is up
and running and the IP address is correct.

Error:
c:\scripts\remote.vbs(10,5) (null): 0x80041003

My script like such:

' On Error Resume Next

intStartingAddress = 220
intEndingAddress = 220
strSubnet = "192.168.1."

For i = intStartingAddress to intEndingAddress
strComputer = strSubnet & i

Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * From Win32_OperatingSystem")
For Each objItem in ColItems
Wscript.Echo strComputer & ": " & objItem.Caption
Next

Next


.



Relevant Pages

  • Re: script error
    ... I can confirm that the remote computer is ... My script like such: ... Set colItems = objWMIService.ExecQuery _ ... do you have the proper permissions to make that query ...
    (microsoft.public.scripting.vbscript)
  • Re: script error
    ... I can confirm that the remote computer is up ... Set objWMIService = GetObject _ ... Set colItems = objWMIService.ExecQuery _ ... do you have the proper permissions to make that query ...
    (microsoft.public.scripting.vbscript)
  • extract checksum from a file using script
    ... >how do I extract the checksum from a file using script. ... >maybe using WMI with the win32_FileSpecification? ... Set colItems = objWMIService.ExecQuery("Select * from ...
    (microsoft.public.scripting.vbscript)
  • VB Script newbie question
    ... I have the following script, ... Press Enter for local machine","Enter Remote Computer ... Set colItems = objWMIService.ExecQuery( ...
    (microsoft.public.scripting.vbscript)
  • Free Drive Space
    ... I need help with a script. ... I need to monitor the free drive space on a ... Set objWMIService = GetObject ("winmgmts: ... Set colItems = objWMIService.ExecQuery ("Select * ...
    (microsoft.public.scripting.vbscript)