473,729 Members | 2,349 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 20994
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
3834
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
4618
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
1417
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
1519
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
6780
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
1887
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
6976
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
5639
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
3684
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
8917
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
8761
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
9426
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...
0
9281
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9142
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8148
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
6022
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
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2163
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.