Any example in the documentation will do. The only thing you have to do
differently is call the static OpenRemoteBaseK ey to get the hive on the
remote system you want to work with, and proceed from there.
I get, "Use the new keyword to create an object instance". And we I do use
new I get
"Microsoft.Win3 2.RegistryKey.O penRemoteBaseKe y(Microsoft.Win 32.RegistryHive ,
string) is a mathod but is used like a type".
Charles,
>
Any example in the documentation will do. The only thing you have to do
differently is call the static OpenRemoteBaseK ey to get the hive on the
remote system you want to work with, and proceed from there.
>
>
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard. caspershouse.co m
>
"Charles" <Charles@discus sions.microsoft .comwrote in message
news:66510017-C79B-43B9-AAD3-BA82D78B7541@mi crosoft.com...
Hi:
I'm looking for an example of modifying the registry of a remote system.
I made a change and I think I'm close. It's now telling me that I don't have
permissions to the remote system. The remote system is a virtual machine in
my domain and I do have permissions as I am running the program as an admin
of the domain.
I get, "Use the new keyword to create an object instance". And we I do use
new I get
"Microsoft.Win3 2.RegistryKey.O penRemoteBaseKe y(Microsoft.Win 32.RegistryHive ,
string) is a mathod but is used like a type".
>
This is what I'm trying to get to work:
>
RegistryKey Tb2Key =
RegistryKey.Ope nRemoteBaseKey( RegistryHive.Lo calMachine,
textBox4.Text). OpenSubKey("Sof tware\\Netopia\ \Timbuktu Pro\\TimbuktuNa me");
Tb2Key.SetValue ("StringValu e", textBox4.Text);
>
RegistryKey RoKey =
RegistryKey.Ope nRemoteBaseKey( RegistryHive.Lo calMachine,
textBox4.Text). OpenSubKey("Sof tware\\Microsof t\\Windows
NT\\CurrentVers ion\\Registered Owner");
RoKey.SetValue( "StringValu e", textBox3.Text);
>
RegistryKey CNameKey =
RegistryKey.Ope nRemoteBaseKey( RegistryHive.Lo calMachine,
textBox4.Text). OpenSubKey("Sof tware\\Microsof t\\Windows
NT\\CurrentVers ionRegisteredOr ganization");
CNameKey.SetVal ue("StringValue ", "NeuStar Inc");
>
Tb2Key.Close();
RoKey.Close();
CNameKey.Close( );
>
"Nicholas Paldino [.NET/C# MVP]" wrote:
>
Charles,
Any example in the documentation will do. The only thing you have to do
differently is call the static OpenRemoteBaseK ey to get the hive on the
remote system you want to work with, and proceed from there.
Comment