473,625 Members | 2,600 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Remote machine registry

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
Nov 20 '05 #1
3 4606
* Steve Montgomery <ma*********@ya hoo.com> scripsit:
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.


<http://www.google.de/groups?as_q=rem ote%20registry% 20WMI%20dotnet& ie=UTF-8>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Thanks so much... It was far easier than I would have expected! You
guys are a LIFE SAVER!

Here's the template I'm using....anyone else who needs to access a
remote system registry, this works and it's very fast.

Private Sub Q2()
Dim remotepc
remotepc = Host.Text
Dim MyVal As String

Dim oRegH As RegistryKey
Dim RegWord As RegistryKey
Dim ReturnVal As String
oRegH =
RegistryKey.Ope nRemoteBaseKey( RegistryHive.Lo calMachine, remotepc)
RegWord = oRegH.OpenSubKe y("Software\Mic rosoft\Windows
NT\CurrentVersi on")
MyVal = RegWord.GetValu e("RegisteredOw ner")
WMIResults.Item s.Add(MyVal)
End Sub

On 20 Jan 2004 18:58:21 +0100, hi************* **@gmx.at (Herfried K.
Wagner [MVP]) wrote:
* Steve Montgomery <ma*********@ya hoo.com> scripsit:
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.


<http://www.google.de/groups?as_q=rem ote%20registry% 20WMI%20dotnet& ie=UTF-8>


Nov 20 '05 #3
* Steve Montgomery <ma*********@ya hoo.com> scripsit:
Here's the template I'm using....anyone else who needs to access a
remote system registry, this works and it's very fast.


Thank you for sharing this piece of source code with the group!

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

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

Similar topics

6
5853
by: deko | last post by:
In a multi-user environment, I have a table that stores hyperlinks to documents that are stored on the machine that hosts the mdb database. The table entry looks like this: ProductDescription.htm#file:\\DBHOST\C$\Documents and Settings\Administrator\My Documents\Products\Documents\ProductDescription.htm Having the hyperlink in this format allows the document to be opened by anyone on the local area network.
0
3169
by: Mark Gibbons | last post by:
I'm having trouble finding information on remote registry access. I work in a multi-domain environment and have created an application which uses code along the line of .. RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, remoteName).OpenSubKey(@"Software") This work's fine if the account used has permissions and I
21
10799
by: Kevin Swanson | last post by:
I'm attempting some remote registry manipulation via C#. I've written a test app to simply grab a specified key from a specified hive on a specified machine. The call to OpenSubKey is throwing System.SecurityException. Also of note: Sitting at my local box, I can open regedit and connect to the remote registry. I see three hives: _CLASSES_ROOT, _LOCAL_MACHINE, and _USERS. I can open all but HKEY_LOCAL_MACHINE. When I try to expand that...
2
1845
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
1
3133
by: UK1967 | last post by:
I wrote a ASP.NET application (Windows 2003 Enterprise Server, IIS, .NET Framework 1.1). This application use the Windows (AD) account and impersonation. Some functions in this application contact, read and change the remote registry (HKLM/Software/...) of some internal server. After installing SP1 on the web server (IIS) all functions with registry access don't run and generate the following error: "Requested registry access is not...
3
2296
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
3
8313
by: JB | last post by:
I am trying to access a registry key on computer like so: key = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, computerName).OpenSubKey(Subkey); There are two keys I am trying to read, 1 works, and the other gives me the "Requested registry access is not allowed." i've narrowed it down to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office It doesnt let me access that path, but the permissions are the same.
8
6667
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#?
12
5634
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?
0
8688
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
8635
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
8494
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...
1
6115
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
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
4085
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...
1
2614
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1496
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.