I need to be able to read the values in a specific Registry Key from a list of Remote Computers. I can do this locally with the following code
using Microsoft.Win32;
RegistryKey rkey = Registry.LocalMachine;
RegistryKey rkeySoftware=rkey.OpenSubKey("Software");
RegistryKey rkeyVendor = rkeySoftware.OpenSubKey("VendorName");
RegistryKey rkeyVersions = rkeyVendor.OpenSubKey("Versions");
String[] ValueNames = rkeyVersions.GetValueNames();
foreach (string name in ValueNames)
{
MessageBox.Show(name + ": " + rkeyVersions.GetValue(name).ToString());
}
but I don't know how to get the same info for a Remote Computer. Am I even using the right approach or should I be looking at WMI or something else?
See Question&Answers more detail:os