02-28-2023 11:44 PM
I want to query registry key which has space characters in it. To query this, the whole command is enclosed inside quotes, the BAT file works separately but in System Exec.vi it shows "ERROR: The system was unable to find the specified registry key or value."
This is the command line "HKLM\SOFTWARE\Adobe\Adobe Acrobat".
Solved! Go to Solution.
03-01-2023 12:02 AM
Why not use the Registry functions available in LabVIEW?
03-02-2023 02:11 AM
As suggested, there are built-in registry VI which you can use.
If you still want not to use that, then I suggest you upload more details about what you're actually doing.
If I feed the command line REG QUERY "HKLM\SOFTWARE\National Instruments\LabVIEW" into the system exec VI, I get the results in the output.
If I put that same command in a bat file and tell the system exec VI to execute that bat file (cmd /c reg.bat and feeding the containing folder to the working directory input), I also get the results.
You might need specific permissions, but I ran LV regularly (although it is from an admin account) and it worked. I would expect that for permission issues you would see another error, but that might not be the case.
03-03-2023 11:59 PM
Hi,
I have other commands to be executed along with this which are all available in a BAT file.
03-05-2023 12:25 AM
Again, if you want help, you need to post actual details (the bat file, the code, etc.). Like I said, in my simple test, it does work.
You can also try doing the same. Start from a simple test which does what I did. Test if that works in a bat file. Test if your own line works in a bat file on its own, etc. See where it stops working and try to figure out there what the difference is.
03-10-2023 10:12 AM
Thanks all for your response. Space was not the issue, I was trying to access a key which is denied.
03-10-2023 10:46 PM
@varshinee97 wrote:
Thanks all for your response. Space was not the issue, I was trying to access a key which is denied.
That can absolutely ruin your day! 😄 (Been there, done that.) Thank you for marking your post as the solution. I'm sure others will find it helpful.