04-09-2018 09:59 PM
Why won't this run the batch file when the button is pressed? I also tried the following strings for the command:
cmd /c notepad
notepad
restart
Nothing works!
04-10-2018 01:50 AM
Hi John,
- Is the SysExec funciton called? (Did you verify this using some debugging?)
- Does the batch file exist in the given path?
- Do you get any errors from SysExec?
- Is there some "hidden" text in the string constant? Can you set its size to content? Can you make the display mode visible?
- Which OS are you using?
Last, but not least:
Can you attach your VI and the batch file?
04-10-2018 11:42 AM
Thanks for the quick reply. I've simplified the issue to a small example. Attached is a simple vi file that is supposed to start notepad when the button is pressed.
It doesn't!
However, the original now works. There was a space character at the beginning of the string. Good call on hidden characters -
Thanks!
(Still curious about what's wrong with the attached, though.OS is Win7 pro.)
04-10-2018 01:40 PM - edited 04-10-2018 01:41 PM
04-10-2018 02:41 PM
Your "test.vI" works fine (after changing the the mechanical action to switch when pressed)...
So that means your original problem lies in your batch file or how you are calling it.
I suggest you go through GerdW's first reply and answer his questions.