473,545 Members | 2,782 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to read registry keys from a remote computer?

I need to read some registry keys of a remote computer. The key will
be any key users provide. (For example : HKEY_CURRENT_US ER\SOFTWARE
\MyGame) I found that there was a handy method called
RegistryKey.Ope nRemoteBaseKey( ); I tried

But everytime I execute it, an UnauthorizedAcc essException occurred at
the OpenRemoteBaseK ey method. Both computer (the one that ran the C#
application, and the remote computer) are Windows XP Professional, and
"Remote Registry Service" enabled. Both computer are logged on as an
adminstrator with no password. And both belong to the same workgroup.

Could you please tell me what is wrong? I've searched the MSDN
documentation and the newsgroup but I couldn't find a solution. Must
be some security setting problem but I have no clue. Do I need some
login procedure first? But the sample on the MSDN had no such thing.

All I want to do is to read (only read, no writing) keys from a remote
computer.

Thanks.

Mar 19 '07 #1
5 6960
hi Sin,

Sin Jeong-hun wrote:
Both computer are logged on as an
adminstrator with no password. And both belong to the same workgroup.
The default security policies prohibit remote access using accounts
without passwords.
mfG
--stefan <--
Mar 19 '07 #2
On Mar 19, 11:38 pm, Stefan Hoffmann <stefan.hoffm.. .@explido.de>
wrote:
hi Sin,

Sin Jeong-hun wrote:
Both computer are logged on as an
adminstrator with no password. And both belong to the same workgroup.

The default security policies prohibit remote access using accounts
without passwords.

mfG
--stefan <--
Thank you. Right now, I can't test it but I'll test it tommorow. Does
this mean that I could read any Key on the remote registry, if the
remote PC is logged on as an adminstrator with a password? I've
examined the security policy manager on the remote PC, and found that
there was an entry that specifies the keys that could be remotedly
accessed. They all started with System\ or Software\, and I don't know
the syntax of them (there was no help file). How should I change it to
allow every keys be remotely accessed? Maybe *?

I just wonder why there's no login procedure to read remote registry.
Isn't this a security threat? Anyone on the network can read and write
the remote PC's registry...

Thanks again.

Mar 19 '07 #3
hi Sin,

Sin Jeong-hun wrote:
>>Both computer are logged on as an
adminstrato r with no password. And both belong to the same workgroup.
The default security policies prohibit remote access using accounts
without passwords.
Thank you. Right now, I can't test it but I'll test it tommorow. Does
this mean that I could read any Key on the remote registry, if the
remote PC is logged on as an adminstrator with a password?
No. It means, that the used credential for accessing the remote PC must
have a password. There must not be anybody logged on to the machine.
examined the security policy manager on the remote PC, and found that
there was an entry that specifies the keys that could be remotedly
accessed. They all started with System\ or Software\, and I don't know
the syntax of them (there was no help file). How should I change it to
allow every keys be remotely accessed? Maybe *?
This an additional setting which may result in an error. But as i said,
i think you are failing due to the default password rules.
I just wonder why there's no login procedure to read remote registry.
Isn't this a security threat? Anyone on the network can read and write
the remote PC's registry...
If you drop your trousers, maybe :) In an security hardened environment
this is not possible.
mfG
--stefan <--

Mar 19 '07 #4
On Mar 20, 1:57 am, Stefan Hoffmann <stefan.hoffm.. .@explido.de>
wrote:
hi Sin,

Sin Jeong-hun wrote:
>Both computer are logged on as an
adminstrator with no password. And both belong to the same workgroup.
The default security policies prohibit remote access using accounts
without passwords.
Thank you. Right now, I can't test it but I'll test it tommorow. Does
this mean that I could read any Key on the remote registry, if the
remote PC is logged on as an adminstrator with a password?

No. It means, that the used credential for accessing the remote PC must
have a password. There must not be anybody logged on to the machine.
The userd credential for accessing the remote PC? Could you tell me
more about
this? The MSDN sample code for OpenRemoteBasek ey doesn't have any
login
precedure. There is no credential used. Thank you.

Mar 20 '07 #5
hi Sin,

Sin Jeong-hun wrote:
The userd credential for accessing the remote PC?
The credentials which are you using for your login.
mfG
--stefan <--
Mar 21 '07 #6

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

Similar topics

2
2815
by: Vinay | last post by:
Hi We can use Environment class to read %Temp% variable o local machine. But I want to read this variable for currently logged on used for remote machine. Is there anyway to do this using .NET? I know I can read remote registry and I can read Environment subkey, for key, current user but that value contains %UserProfile% which in turn contains...
21
10768
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:...
3
3042
by: Slimo | last post by:
Hello, I'm searching some example of code (VB) for reading remote registry subkeys and keys. Thanks
4
3544
by: Tim Frawley | last post by:
I am have created a reporting tool for our network to output various information we are interested in like Microsoft Office versioning information and etc. One of the things I have to do is attempt to Read the machines Registry remotely like so: Private Function ReadRegistryKey(ByVal strRLoc As String, _ ByVal strSubKey As String, ByVal...
2
5566
by: Ben | last post by:
I think I might have found a bug in Visual Studio. The following code should work and doesn't: My.Computer.Registry.LocalMachine.CreateSubKey("Software\Dravet") My.Computer.Registry.LocalMachine.SetValue("HKEY_LOCAL_MACHINE\Software\Dravet", "loglevel", "1") My.Computer.Registry.LocalMachine.GetValue("loglevel") This code does work:...
3
2080
by: eSolTec, Inc. 501(c)(3) | last post by:
Thank you in advance for any and all assistance. Is there a way to create a registry key, but orphan it from the program that created it? Reason: Create a key, but not associate it with the program, so that the program can check for that key to see if the product has been installed and stop a second installation or illegal installation. ...
0
3111
by: TheSilverHammer | last post by:
I am trying to figure out how to enumerate through registry keys and values using WMI and C#. Please, NO VB or VB.SCRIPTS. I have found plenty of examples of how to do this in VB and VBS. I would like see how to do this under C#. I need to write an application that looks at processes, files, scan the registry of a remote computer. I...
1
3124
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...
3
2652
by: MSK | last post by:
Hi I am a newbie to ASP.NET and VBScript, currently I am designing a page to show all the mapped drives using client-side scripts.. I want to read all the mapped drive details (name and Remote Path) from the registry ("JKEY_CURRENT_USER\Network\") then I want to show this in list box like P: \\machine1\folder1 Z: \\mahcine2\folder2
0
7432
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...
0
7689
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. ...
0
7943
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...
0
7786
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...
0
6022
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...
0
5076
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...
1
1919
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
1044
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
743
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...

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.