Hello,
Sorry for my very bad English...
I have a problem when I tried to read registry on remotes computers.
The code must run under VBA Excel. The final purpose is to extract
from print servers the list of installed printers with ip address.
Remotes servers are on various domains without trusts relationships
and various OS like W2003, W2K and NT4.
When I use this code:
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
oReg = objSWbemLocator.ConnectServer(strSrvName, "root
\default:StdRegProv", strDomain & "\" & strUser, strPassword)
I always receive the error message "The object doesn't support this
property or method...".
I have tried this syntax:
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
objSWbemServices = objSWbemLocator.ConnectServer(strSrvName, "root
\default", strDomain & "\" & strUser, strPassword)
Set oReg = objSWbemServices.Get("StdRegProv")
with the same effect.
Thank's for your help.
Jo
PS: ConnectServer on other namespace like root\cimv2 works fine for
other purpose but in same context (domain, servers, user...)
Bookmarks