LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

registry error -600

Hi all, I've had a look for solutions to my problem but can't find anything that helps.  I have the below diagram in a VI.  I'm trying to read some calibration data from the Windows registry.  Usually I'd use text files but I'm playing with new functionality.

 

Everytime I run the VI I get a -600 unspecified error.   The values that I'm trying to read do exist, and there shouldn't be any permissions errors as I'm only trying to read anyway.  

 

registry error.png

 

I'm not sure if connecting all of the reads is contributing to the problem, but I still get the same error even if only one is in there.  I am running Win 7x64, but the values are DWORD and string. 

0 Kudos
Message 1 of 5
(3,250 Views)

Hi Chris,

 

are you sure with the read permission on Win7 with it's UAC?

 

I would recommend to not use the registry anymore. Software is very resticted in which parts of the registry are accessable. This will not happen with files in the correct places!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,246 Views)

The "Open Registry Key" does not know you're only going to read values. You have to set the security mask to "KEY_READ" to open the registry read-only.

If you need to write registry keys during software operation you should work in the HKCU root key instead of the HKLM root key. If you only need to read HKLM is fine, but then you have to use the security mask.

 

0 Kudos
Message 3 of 5
(3,241 Views)

Thanks that may solve my problem, I'll give it a go..... However

 

The reason I'm working in HKLM is so that the key that I write (later when I get to it) is available to all users.  Would HKCU or HKU\default let all users read and write to the key?

0 Kudos
Message 4 of 5
(3,234 Views)

No, as the key name says, HKCU is for the current user. When logged in as a different user you can't read keys written by other users.

I never used HKU and it does not seem to be a "standard" location for registry data.

When you need to write keys and exchange them between users a config file in the all users application data folder might be a better solution.

 

0 Kudos
Message 5 of 5
(3,226 Views)