473,396 Members | 1,966 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,396 software developers and data experts.

Registry access denied using RegistryKey class

I am using the RegistryKey class to access the registry on remote
machines. I only require read access. I am able to successfully read
registry keys under HKLM\Software\Microsoft\Windows
NT\CurrentVersion\HotFix but I get a permissions error when I try to
access HKLM\Software\Network Associates\TVD\Shared Components\VirusScan
Engine\4.0.xx. The security permissions are identical on these two
keys. Here is my code:
RegistryKey HotFixKey = null;
RegistryKey DatVerKey = null;

//This works:
HotFixKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMa chine,
machineName).OpenSubKey(@"Software\Microsoft\Windo ws
NT\CurrentVersion\HotFix");

//This fails:
DatVerKey =
RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMa chine,machineName).OpenSubKey(@"Software\Network
Associates\TVD\Shared Components\VirusScan Engine\4.0.xx");

This is the error for the second connection:
{"Requested registry access is not allowed." }

Basically what I am doing is reading all of the hotfixes installed in
the first key and the most recent dat file in the second one. Why can I
read the first but not the second?

Nov 16 '05 #1
0 3172

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

Similar topics

7
by: Bob | last post by:
I'm working on a Windows app that needs to write to the Registry HKLM. I keep getting a "System.UnauthorizedAccessException: Cannot write to the registry key." error when running the app. I'm...
7
by: vbMark | last post by:
Here's my code: string strKeys; RegistryKey rk = Registry.CurrentUser; RegistryKey val = Registry.CurrentUser; string sLocation = "Software\\Microsoft\\Windows\\CurrentVersion \\Internet...
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...
2
by: Jenna | last post by:
In my test form, WebForm1.aspx.vb, this code successfully connects to the remote registry: Try Dim RegTo As Microsoft.Win32.RegistryKey =...
8
by: Al Kaufman | last post by:
I have a simple console app that uses: regSubKey = <some registry key> Dim reg As RegistryKey = Registry.ClassesRoot.OpenSubKey(regSubKey) Dim path As String path = CStr(reg.GetValue(""))
1
by: PiotrKolodziej | last post by:
Hi Here is the code: this.regPath = @"Software\FileManager\" ; System.Security.Permissions.RegistryPermission permissions = new...
3
by: Dylan Parry | last post by:
Hi folks, I've just got a new machine at work, so I've spent all day copying across all of my work from my old machine. Now I've come across a problem that I've never seen before. I now get...
5
by: Parv | last post by:
I am working in a domain environment. I am on a client machine and wants to edit registery of domain server. I am currently in a Domain user account and member of Domain administrators on the...
20
by: Newbie Coder | last post by:
MFC Application VC++.NET 2003 I have a certain registry key (HKCU\Software\MyKey) that contains between 30 & 64 string values I need to write a '*' to all those 30 - 64 string values under...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...
0
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...
0
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,...

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.