03-21-2014 09:53 AM
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.
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.
03-21-2014 10:16 AM
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!
03-21-2014 10:30 AM
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.
03-21-2014 10:53 AM
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?
03-21-2014 11:06 AM
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.