LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open Registry Key VI. Error -604. But just under Run Time Engine (RTE) when no admin rights

Hi,

 

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

 

Any suggestions?

 

Capture.PNG

0 Kudos
Message 1 of 6
(5,786 Views)

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. 


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 6
(5,776 Views)

Yes, I'm trying to read the key I created.

It should no be ANY Read or Write restrictions in HKLM_CURRENT_USER branch.

 

I'm using LV2013f2.

 

K.

0 Kudos
Message 3 of 6
(5,768 Views)

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?!

 

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 6
(5,753 Views)

Yes, I ended up with the same but I'd like to drill it down.

 

Somehow Win7 differentiate between LV RTE & Dev Env, though...

0 Kudos
Message 5 of 6
(5,749 Views)

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)

 

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 6 of 6
(5,742 Views)