Click here to Skip to main content
12,953,379 members (54,629 online)
Rate this:
Please Sign up or sign in to vote.
See more:

The application is written in When debugging the code, the section which causes an issue is as follows:

Dim RegKey As RegistryKey
RegKey = Registry.LocalMachine.OpenSubKey(Path, True)

When the above statement is executed the exception 'Requested registry access is denied' occurred. Operating system is of Windows #7.

It must be mentioned that the above code works perfectly on Windows XP.

Any help would be appreciated.
Posted 12-Oct-12 3:05am
Updated 12-Oct-12 3:26am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Since Vista OS an application needs elevated privileges to access 'Local Machine' subtree. See additional info at Stack Overflow[^].
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

This package was written a few years ago in order to implant a few details in registry. I appreciate that Microsoft promote individual to use ‘Settings’ or create some kind of XML file to save any details which your package need. As a result my approach is as such now days.
However, in order to resolve this issue and for the purpose of debugging, I have disabled UAC (User Account Control). By implementing this, the issue is resolved.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,429
CHill60 3,490
Maciej Los 3,103
Jochen Arndt 1,975
ppolymorphe 1,930

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 9 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100