Best practice for using Registry - UAC Issues
-
My application writes data into the Registry which is causing a UAC issue on vista. I keep data in the registry so I can access it across different applications we have (this is not a mass product but only installed on selected machines). Since I am storing data into the LocalMachine SOFTWARE keys, is that was is causing the UAC errors, or should I store the application config settings somewhere else?
-
My application writes data into the Registry which is causing a UAC issue on vista. I keep data in the registry so I can access it across different applications we have (this is not a mass product but only installed on selected machines). Since I am storing data into the LocalMachine SOFTWARE keys, is that was is causing the UAC errors, or should I store the application config settings somewhere else?
Look into the use of the applicationdata folder, I beleive it is designed for this type of use instead of the registry. I think you'll find fighting Vista's UAC will drive you nuts whereas changing the data store is fairly simple.
Never underestimate the power of human stupidity RAH
-
My application writes data into the Registry which is causing a UAC issue on vista. I keep data in the registry so I can access it across different applications we have (this is not a mass product but only installed on selected machines). Since I am storing data into the LocalMachine SOFTWARE keys, is that was is causing the UAC errors, or should I store the application config settings somewhere else?
Anything that is user specific will work just fine, such as Environment.SpecialFolder.ApplicationData and HKCurrentUser. Anything that applies to all users will fail unless you have admin rights and elevated privileges apply, as for Environment.SpecialFolder.CommonApplicationData and HKLocalMachine. The logic is: a single regular user is not allowed to influence the machine's behavior for other users. :)