Registry access denied when accessing registry
-
I have an application which creates various file associations in the registry which works perfectly under XP but causes UnauthorizedAccessExceptions when run on Vista. Is there a way to allow this application (which must be run on Windows startup) access to the registry for normal users?
-
I have an application which creates various file associations in the registry which works perfectly under XP but causes UnauthorizedAccessExceptions when run on Vista. Is there a way to allow this application (which must be run on Windows startup) access to the registry for normal users?
Add a manifest file to your application, although you should really change your code to avoid writing to protected area's of the registry. regards,
Jonathan Wilkes Darka[Xanya.net]
-
Add a manifest file to your application, although you should really change your code to avoid writing to protected area's of the registry. regards,
Jonathan Wilkes Darka[Xanya.net]
Thanks for the reply. I have added a manifest to the executable which solves the issue but it asks for permission to run each time, is there a way to make it just ask once on first run? Unfortunately, changing the code is not an option as it needs to add file associations to the registry which require access to HKEY_CLASSES_ROOT which is what appears to be causing the issue.
-
Thanks for the reply. I have added a manifest to the executable which solves the issue but it asks for permission to run each time, is there a way to make it just ask once on first run? Unfortunately, changing the code is not an option as it needs to add file associations to the registry which require access to HKEY_CLASSES_ROOT which is what appears to be causing the issue.
Your installer should do this and your application should leave the key the hell alone. If you want to write per-user file associations, you can write them to HKEY_CURRENT_USER\Software\Classes.
DoEvents
: Generating unexpected recursion since 1991 -
Your installer should do this and your application should leave the key the hell alone. If you want to write per-user file associations, you can write them to HKEY_CURRENT_USER\Software\Classes.
DoEvents
: Generating unexpected recursion since 1991 -
Again, this is not possible as they must be created by the application and are not known at installation time. I am looking into other ways of registering file extensions for Vista.
-
Split the registry writer into a second executable. You'll only get a UAC prompt when actually calling it to make a change.
-- If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.