ConnectionOptions optionst = new ConnectionOptions(); optionst.Impersonation = ImpersonationLevel.Impersonate; optionst.EnablePrivileges = true; optionst.Authority = "NTLMDOMAIN:" + "abc.net"; ManagementScope myScope = new ManagementScope("\\\\" + strcompname + "\\root\\default", optionst); ManagementPath myPath = new ManagementPath("StdRegProv"); ManagementClass mc = new ManagementClass(myScope, myPath, null); mc.Scope = myScope; uint hDefKey = HKEY_LOCAL_MACHINE; string sSubKeyName = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall;" object[] methodParams = new object[] { hDefKey, sSubKeyName, null }; RegistryKey regKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, strcompname, Microsoft.Win32.RegistryView.Registry64); regKey = regKey.OpenSubKey(sSubKeyName); foreach (string entry in names) { }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)