473,386 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Need an Example Modifying Remote Registry

Hi:

I'm looking for an example of modifying the registry of a remote system.

Thanks much!
Charles
Jul 29 '08 #1
3 2385
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]
- mv*@spam.guard.caspershouse.com

"Charles" <Ch*****@discussions.microsoft.comwrote in message
news:66**********************************@microsof t.com...
Hi:

I'm looking for an example of modifying the registry of a remote system.

Thanks much!
Charles

Jul 30 '08 #2
I get, "Use the new keyword to create an object instance". And we I do use
new I get
"Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Mic rosoft.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.LocalMa chine,
textBox4.Text).OpenSubKey("Software\\Netopia\\Timb uktu Pro\\TimbuktuName");
Tb2Key.SetValue("StringValue", textBox4.Text);

RegistryKey RoKey =
RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMa chine,
textBox4.Text).OpenSubKey("Software\\Microsoft\\Wi ndows
NT\\CurrentVersion\\RegisteredOwner");
RoKey.SetValue("StringValue", textBox3.Text);

RegistryKey CNameKey =
RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMa chine,
textBox4.Text).OpenSubKey("Software\\Microsoft\\Wi ndows
NT\\CurrentVersionRegisteredOrganization");
CNameKey.SetValue("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 OpenRemoteBaseKey to get the hive on the
remote system you want to work with, and proceed from there.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Charles" <Ch*****@discussions.microsoft.comwrote in message
news:66**********************************@microsof t.com...
Hi:

I'm looking for an example of modifying the registry of a remote system.

Thanks much!
Charles


Jul 30 '08 #3
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.

RegistryKey CNameKey =
RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMa chine,
textBox4.Text).OpenSubKey("Software").OpenSubKey(" Microsoft").OpenSubKey("Windows NT").OpenSubKey("CurrentVersion");

CNameKey.SetValue("RegisteredOrganization", "Company Inc",
RegistryValueKind.String);

Thanks!
"Charles" wrote:
I get, "Use the new keyword to create an object instance". And we I do use
new I get
"Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Mic rosoft.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.LocalMa chine,
textBox4.Text).OpenSubKey("Software\\Netopia\\Timb uktu Pro\\TimbuktuName");
Tb2Key.SetValue("StringValue", textBox4.Text);

RegistryKey RoKey =
RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMa chine,
textBox4.Text).OpenSubKey("Software\\Microsoft\\Wi ndows
NT\\CurrentVersion\\RegisteredOwner");
RoKey.SetValue("StringValue", textBox3.Text);

RegistryKey CNameKey =
RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMa chine,
textBox4.Text).OpenSubKey("Software\\Microsoft\\Wi ndows
NT\\CurrentVersionRegisteredOrganization");
CNameKey.SetValue("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 OpenRemoteBaseKey to get the hive on the
remote system you want to work with, and proceed from there.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Charles" <Ch*****@discussions.microsoft.comwrote in message
news:66**********************************@microsof t.com...
Hi:
>
I'm looking for an example of modifying the registry of a remote system.
>
Thanks much!
Charles
Jul 30 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Cherry | last post by:
Hi, can I access the registry of a remote machine using VB.NET? While connecting to the remote machine I would be using the admin login of that machine. Thanks.
2
by: Mothish | last post by:
hi guys, is there any where i can access remote registry through c#. im new on this can any one help me on this. thanks mothish
5
by: Parv | last post by:
I am working in a domain environment. I am on a client machine and wants to edit registery of domain server. I am currently in a Domain user account and member of Domain administrators on the...
3
by: Geoff McElhanon | last post by:
I have been struggling with a security issue that occurs under .NET 2.0, but does not occur under .NET 1.1. Essentially I am trying to open up a performance counter on a remote server and monitor...
3
by: CAIBird | last post by:
hi, i'm wondering how to reader or write registry of a remote host. are there any classes help? Thanks in advance -Zhilin
5
by: Sin Jeong-hun | last post by:
I need to read some registry keys of a remote computer. The key will be any key users provide. (For example : HKEY_CURRENT_USER\SOFTWARE \MyGame) I found that there was a handy method called...
8
by: Hayato Iriumi | last post by:
Hello, folks. I have a need to get the value of %windir% on a remote machine. Is it possible to get this value using C#?
4
by: Kerem Gümrükcü | last post by:
Hi, is it possible to get the Information that comes from OperatingSystem Class from a Remote Comupter. Is there a remote information supporting OperatingSystem Class or can i get this...
6
tlhintoq
by: tlhintoq | last post by:
I pride myself on being able to Google just about anything but... I have fought, tried, searched and fought some more on this one. I am using VMware, and am able to debug from Visual Studio to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.