473,320 Members | 2,117 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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_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, 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 6943
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
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.
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 OpenRemoteBasekey 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
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...
21
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...
3
by: Slimo | last post by:
Hello, I'm searching some example of code (VB) for reading remote registry subkeys and keys. Thanks
4
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...
2
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")...
3
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...
0
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...
1
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,...
3
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.