04-01-2016 11:25 AM
I'm looking to be able to write a windows registry key when installing a TestStand sequence. I was thinking I could do it within the Deployment Utility, but it seems that all I can do is run a custom command, which would require a custom LabVIEW vi. Is there a better way (or more built in to LabVIEW/TestStand) to handle this?
Specifically, this registry key would store the MD5 sum for the sequence + it's dependent files. I want to store it in the registry because only an admin to the computer can change that (which is part of our IT policy), and it can be stored in a structure without affecting the folder for the teststand sequence.
04-04-2016 09:38 AM
We usually use an exe (written in LabVIEW) or batch file to do this. We deploy them to a temporary folder and then use the custom command to execute them. If you wanted you could even have the custom command delete them out of the temporary folder when it completes (or rather a different custom command delete them).
Cheers,
04-06-2016 01:02 PM
I'm of the mindset that I'd prefer not to write a custom piece of software when the ability already exists elsewhere. Which was why I was asking if there was another way to do it.
In the batch file you speak of, are you just using the "reg add" command? If so, what's the reason you decided to put it in a batch file rather than trying to run that command directly from the custom commands screen?
I would prefer to delete the temporary files after the fact, but I'm having trouble getting custom commands to work outside of a batch file (I've already contacted NI support about this). So I'm left with the assumption that you would need another batch file to delete the first batch file. Is this correct?
04-06-2016 02:24 PM
We use a batch file because we have other things in there. This way we can just call the one batch file from multiple deployments. You could do it all from the command line if you wanted. Then you wouldn't have to delete any files. We use a command line to delete the batch if necessary. Most times we just leave the batch file in the Temp folder.
04-12-2016 03:50 PM
So I got it to work within the custom commands window. Here's what is necessary to get it to work:
Command Directory: None
Commands and Arguments: cmd.exe /c reg add "HKEY_LOCAL_MACHINE\Software\Company name\Software Identifier" /v "MD5" /d "<MD5 value>" /f
The missing piece of info to get commands to work in the custom commands window is that one needs to include the prefix "cmd.exe /c" part. That part wasn't clear from the documentation, and the person I was working with at NI support said that they've submitted a Corrective Action Request to fix the documentation, and they wrote a knowledge base article to explain it. I'll link to that when it goes live.
Thanks jigg for the help and the feedback.
04-12-2016 06:11 PM
I see. I guess I assumed that you knew that already. Sorry. Sounds like you are good to go then. Awesome!