Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



WMI giving Error : 0x80041010

Windows Server Help


Reply
 
Thread Tools Search this Thread
  #1  
Old 03-04-2007
Ranjit
 
Posts: n/a
WMI giving Error : 0x80041010

Hi all,
I wrote a small script to connect to remote server within a domain. IT works
well for local computer, but when I do for a remote server I get ,
Error : 0x80041010.
Code: 80041010.
Source:(null).
Here is the code:

strComputer = "IP_Address" ' I put correct IP address here.

Const intMin = 3600

strDomain = "myDomain" 'Correct Domain

strUser = "myUser" 'Correct User name

strPassword ="mypw" 'Correct PW

Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objSWbemLocator.ConnectServer(strComputer, _
"root\CIMV2", _
strUser, _
strPassword, _
"MS_409", _
"NTLMDomain:" + strDomain)

Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM Win32_process")

For Each objItem in colItems 'Error Occurs here.

WScript.Echo "Error in the For Loop :" & Err.Description & VBCRLF &
Err.Number & VBCRLF & Err.Source
WScript.Echo "NAME: " _
& objItem.Name & VBNewLine _
& "Handle: " & objItem.handle & VBNewLine _
& "ProcessID: " & objItem.processid & VBNewLine _
& "WorkingSetSize: " & objItem.workingsetsize & VBNewLine _
'WScript.Echo
Next
***********************************************************

Please help.
Thank you.





Reply With Quote
  #2  
Old 13-06-2007
Tanya
 
Posts: n/a
RE: WMI giving Error : 0x80041010

This reply is a bit late, but I had a similar issue, and finally found this
post http://www.tek-tips.com/viewthread.c...351679&page=12.

You need to install WMI Windows Installer Provider windows component. It
worked for me.

Tanya

"Ranjit" wrote:

> Hi all,
> I wrote a small script to connect to remote server within a domain. IT works
> well for local computer, but when I do for a remote server I get ,
> Error : 0x80041010.
> Code: 80041010.
> Source:(null).
> Here is the code:
>
> strComputer = "IP_Address" ' I put correct IP address here.
>
> Const intMin = 3600
>
> strDomain = "myDomain" 'Correct Domain
>
> strUser = "myUser" 'Correct User name
>
> strPassword ="mypw" 'Correct PW
>
> Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
> Set objWMIService = objSWbemLocator.ConnectServer(strComputer, _
> "root\CIMV2", _
> strUser, _
> strPassword, _
> "MS_409", _
> "NTLMDomain:" + strDomain)
>
> Set colItems = objWMIService.ExecQuery( _
> "SELECT * FROM Win32_process")
>
> For Each objItem in colItems 'Error Occurs here.
>
> WScript.Echo "Error in the For Loop :" & Err.Description & VBCRLF &
> Err.Number & VBCRLF & Err.Source
> WScript.Echo "NAME: " _
> & objItem.Name & VBNewLine _
> & "Handle: " & objItem.handle & VBNewLine _
> & "ProcessID: " & objItem.processid & VBNewLine _
> & "WorkingSetSize: " & objItem.workingsetsize & VBNewLine _
> 'WScript.Echo
> Next
> ***********************************************************
>
> Please help.
> Thank you.
>
>
>
>

Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "WMI giving Error : 0x80041010"
Thread Thread Starter Forum Replies Last Post
Seagate Momentus XT hard drive giving smart error End to End error detection = 1 Honey$ing Hardware Peripherals 4 05-12-2011 08:49 PM
Save as PDF is giving? The export failed due to an unexpected error? error message in Microsoft Word 2010 He_Man Windows Software 6 04-12-2011 11:24 AM
Internet Explorer and Google Chrome Error giving some port error Ketaki Technology & Internet 8 23-06-2011 10:15 PM
My HP Laser jet 4350 is giving 59.40 error Wenro Hardware Peripherals 6 13-06-2010 12:31 AM
Windows giving error after installing COD Crespin Operating Systems 5 21-01-2010 01:06 AM


All times are GMT +5.5. The time now is 04:59 PM.