I get, "Use the new keyword to create an object instance". And we I do use
new I get
"Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive,
string) is a mathod but is used like a type".
This is what I'm trying to get to work:
RegistryKey Tb2Key =
RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine,
textBox4.Text).OpenSubKey("Software\\Netopia\\Timbuktu Pro\\TimbuktuName");
Tb2Key.SetValue("StringValue", textBox4.Text);
RegistryKey RoKey =
RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine,
textBox4.Text).OpenSubKey("Software\\Microsoft\\Windows
NT\\CurrentVersion\\RegisteredOwner");
RoKey.SetValue("StringValue", textBox3.Text);
RegistryKey CNameKey =
RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine,
textBox4.Text).OpenSubKey("Software\\Microsoft\\Windows
NT\\CurrentVersionRegisteredOrganization");
CNameKey.SetValue("StringValue", "NeuStar Inc");
Tb2Key.Close();
RoKey.Close();
CNameKey.Close();
Nicholas Paldino said:
Charles,
Any example in the documentation will do. The only thing you have to do
differently is call the static OpenRemoteBaseKey to get the hive on the
remote system you want to work with, and proceed from there.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Charles said:
Hi:
I'm looking for an example of modifying the registry of a remote system.
Thanks much!
Charles