RE: Error 0x80041001 retrieving some WMI data in Windows 2003 SP1

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



Hi all
I need some wmi information about installed MS information on the remote
machine running 2003 sever sp1. I have written a small code using
administrator rights to do that but there is error and i can not solve. i
have configure dcom and something else as i read. Please show me how to
solve the problem . Thanks in advances

-----------------------------------------------
strComputer = "192.168.1.46"
Const wbemImpersonationLevelImpersonate = 3
Const wbemAuthenticationLevelPktPrivacy = 6


Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objSWbemServices = objSWbemLocator.ConnectServer(strComputer,
"\root\CIMV2", "w2003deployment\administrator", "12345")

objSWbemServices.Security_.ImpersonationLevel =
wbemImpersonationLevelImpersonate
objSWbemServices.Security_.AuthenticationLevel =
wbemAuthenticationLevelPktPrivacy

Set colSoftware = objSWbemServices.ExecQuery("SELECT * FROM Win32_Product")


For Each objSoftware in colSoftware
Wscript.Echo objSoftware
Next
--------------------------------------------------------
.