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

Registry access denied using RegistryKey class

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.