hi everyone,
I need to do a query into some remote registry, workstation PCs as well
as domain PCs.
Previously, i was using the native WMI COM objects like this:
objLocator = CreateObject("WbemScripting.SWbemLocator")
objService = objLocator.ConnectServer(ComputerName, "root\default", _
strUserName, _
strPassword)
objService.Security_.ImpersonationLevel = 3
objWMI = objService.Get("stdregprov")
The reason i had to move to code over to .NET is the issue's i'm having
executing that code in a multi-threaded environment. I'm doing a
recursive call over and over again to seek for a particular key in the
registry.
What is the equivalent to getting a WMI object which can read registry
using System.Management namespace? i think i can do the impersonation
using the ConnectionOptions class together with ManagementScope, but i
dont know whats the next step.
I cannot use "RegistryKey.OpenRemoteBaseKey" simply because i need to
obtain these information from workstation PC's (domain is not a problem
with impersonation).
been cracking my head with this problem for the past few days, any
suggestions?
|