473,396 Members | 1,738 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,396 software developers and data experts.

Reading Remote Registry using VB.Net

Hi All,

I want read the below remote registry using VB.Net.

"SOFTWARE\Microsoft\Windows\CurrentVersion\Install er\UserData\S-1-5-18\Products"

Please anyone help me.

Thanks

Nila
Apr 21 '09 #1
5 20908
iam_clint
1,208 Expert 1GB
So I am assuming the remote pc would be a pc on your network?
Read remote Registry
Expand|Select|Wrap|Line Numbers
  1. Dim MyReg As Microsoft.Win32.RegistryKey = Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, "dcops2100") 
  2.  
  3.         Dim MyRegKey As Microsoft.Win32.RegistryKey 
  4.         Dim MyVal as string
  5.  
  6.         MyRegKey = MyReg.OpenSubKey("Software\Microsoft\Windows NT\currentVersion") 
  7.         MyVal = MyRegKey.GetValue("RegisteredOwner") 
  8.         MyRegKey.Close() 
  9.         TextBox1.Text = MyVal
  10.  
Write Remote Registry
Expand|Select|Wrap|Line Numbers
  1. Dim MyReg As Microsoft.Win32.RegistryKey = Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, "dcops2100") 
  2.  
  3.         Dim MyRegKey As Microsoft.Win32.RegistryKey 
  4.         Dim MyVal as string
  5.  
  6.         MyRegKey = MyReg.OpenSubKey("Software\Microsoft\Windows NT\currentVersion", True) 
  7.         MyRegKey.SetValue("RegisteredOwner", "EinzutragenerWert") 
  8.         MyRegKey.Close()
  9.  
Apr 21 '09 #2
Hi Clint,

I want to read the values from the below remote registry path.

"SOFTWARE\Microsoft\Windows\CurrentVersion\Ins tall er\UserData\S-1-5-18\Products"

I am using VB.Net

Thanks.
Nila
Apr 22 '09 #3
iam_clint
1,208 Expert 1GB
I gave full examples of reading and writing to a remote registry.. I will not write the code to your exact needs.. you should be able to handle this
Apr 22 '09 #4
Hi Clint,

Thanks for your idea.
Actually i read the remote registry using the code which i have posted. But it is not reading the values from the path i need. It is also not giving any error. So i was confused with this.

Thanks.
Nila
Apr 22 '09 #5
@iam_clint
I know it's been many years since this was written but I want to reply any way since this still helps people today.

Thank you for posting this, it resolved a problem I was having reading remote registry. I was able to complete my program which reads the Office version and creates desktop shortcuts. I use this on our terminal server to help customers without even needing to connect to their computer.
Aug 2 '16 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Lee | last post by:
I have created a custom log for my apps to write to. Writing to the log seems to be no problem, it's when I go to read it I get unexpected results. I have an application that reads the log and...
3
by: Steve Montgomery | last post by:
Does anyone have a sample block of code they can share for checking a DWORD value on a remote network machine's registry? For example, to validate a patch deployment. MSDN has a great sample for...
0
by: sxzy | last post by:
Hi, I use OpenRemoteBaseKey to open HKLM key on remote machine in same domain Code fails on OpenSubKey with error "Requested registry key is not allowed" I tried to give permissions to...
0
by: Flinker | last post by:
When attempting to read the System event log on a remote system, I receive a "Requested registry access is not allowed" exception. I temporary added myself as an administrator to the remote system...
4
by: Chuck B | last post by:
I am modifying remote registries for about 150 computers. Is there any easy way in C# to do a remote registry backup?
0
by: =?Utf-8?B?cGhpbC5k?= | last post by:
Hi, I've a need to use remote username and password credentials to access remote registry information via VB.net, can this be done? I've currently a vbs script that periodically accesses wmi...
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...
12
by: =?Utf-8?B?YXVsZGg=?= | last post by:
i current have a way to read both local and remote machines registry keys and create a textual view (.txt output). i now looking for ways to do export of local and remote mahcine registry keys...
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:
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.