When I run my code under RTE I'm getting -604 error saying remote access to registry denied.
To make it work I have to grant admin rights to the user, and then I can run my code under RTE.
The problem doesn't exist under Development Environment. The user can have no admin rights to be able access the registry.
OS: Win7 x32
Are you trying to read a key that you created?
I had a similar problem before with reading from the registry - I believe that either Windows or the LabVIEW build knows that the application calls the registry and as such requires elevated permissions.
Even just reading from the registry the application or Windows knows it calls the registry and it would not run without elevated permissions. I ended up storing my settings in a config file in Users Application Data. I believe this is the recommended way of doing things for Win >= 7.
Yes, you are right and that's what I was expecting as well when I ran into my problem. I just think that windows is clever enough to realise that your application is trying to read/write from the registry but not clever enough to know *where* you're trying to read/write from. I ended up giving up getting it to work without elevated privileges and used a config file instead.
The difference is that you're trying to read from local user keys (which should be fine in user mode) and I was trying to write to HKLM as I needed computer wide settings.
Is the computer on a domain? Perhaps could be a group policy setting?!
Well in the RTE it's an executable so I expect UAC has a look at what the exe tries to do. Also...are you running the development environment on an account with administrator privileges / UAC turned off? (I do development on a PC with local admin rights....and/or when LV installs it requests to always run with elevated privleges).
I think there is a way to get an application to declare it needs elevated privileges at install/run-time somehow but I never really figured out how to do this.
(Because to install the software you need admin rights so while installing it can do other things...which is why you can set registry keys in your installer)