By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,990 Members | 1,990 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,990 IT Pros & Developers. It's quick & easy.

Access Remote machine registry

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
* Steve Montgomery <ma*********@yahoo.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=remote%20registry%20WMI%20dotnet&ie=UT F-8>

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

P: n/a
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.OpenRemoteBaseKey(RegistryHive.LocalMa chine, remotepc)
RegWord = oRegH.OpenSubKey("Software\Microsoft\Windows
NT\CurrentVersion")
MyVal = RegWord.GetValue("RegisteredOwner")
WMIResults.Items.Add(MyVal)
End Sub

On 20 Jan 2004 18:58:21 +0100, hi***************@gmx.at (Herfried K.
Wagner [MVP]) wrote:
* Steve Montgomery <ma*********@yahoo.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=remote%20registry%20WMI%20dotnet&ie=UT F-8>


Nov 20 '05 #3

P: n/a
* Steve Montgomery <ma*********@yahoo.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 discussion thread is closed

Replies have been disabled for this discussion.