473,698 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading Remote Registry using VB.Net

7 New Member
Hi All,

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

"SOFTWARE\Micro soft\Windows\Cu rrentVersion\In staller\UserDat a\S-1-5-18\Products"

Please anyone help me.

Thanks

Nila
Apr 21 '09 #1
5 20987
iam_clint
1,208 Recognized Expert Top Contributor
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
nilaangel78
7 New Member
Hi Clint,

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

"SOFTWARE\Micro soft\Windows\Cu rrentVersion\In stall er\UserData\S-1-5-18\Products"

I am using VB.Net

Thanks.
Nila
Apr 22 '09 #3
iam_clint
1,208 Recognized Expert Top Contributor
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
nilaangel78
7 New Member
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
dondreak
1 New Member
@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
3832
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 displays it's contents in a grid, and it also receives event notification from the log when it's updated. When the event fires I get exactly the text that was logged in exactly the way I logged, but when I read the entries from the log, or view them...
3
4616
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 access the local registry bur I'd like to mount several remote registry to check a specific key for a DWORD value. Thanks, Steve
0
1416
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 everyone on that registry key, lowering all .NET 1.1 permissions to full trust and to no avail. The only thing that worked was: <identity impersonate="true"/>
0
1518
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 and the code worked fine. What permissions need to be assigned to my account on the remote system? If I use the NT 4.0 resource kit utility "elogdmp.exe" i am able to dump event log entries with my account. Here is a segment of the code: ev...
4
6779
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
1884
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 and registry information on remote machines across domains, it uses the WbemLocator.ConnectServer facility to provide specific username and password credentials. I'm trying to move this code to a vb.Net service and I'm trying to avoid the wsh...
5
6972
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 RegistryKey.OpenRemoteBaseKey(); I tried But everytime I execute it, an UnauthorizedAccessException occurred at the OpenRemoteBaseKey method. Both computer (the one that ran the C# application, and the remote computer) are Windows XP Professional,...
12
5636
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 into ".reg" file format via C#. is this do able? what do i need to research to do this? or is where i need to windows WinApi?
6
3683
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 the VMware virtual machine... Right up until the application being debugged tries to write to the registry. Then it fails due to lack of security permissions. It writes to the Host PC registry just fine. This is only happening when remote...
0
8674
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8604
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8895
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7728
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2330
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.