I am trying to run a batch file as part of an Action Profile.
This command line works:
C:\Program Files\HostMonitor3\serverdown.bat
When I run this command from a CMD prompt, the parameter passes to the batch file correctly.
C:\Program Files\HostMonitor3\serverdown.bat Test
But when I try to pass one of the macro variables to the batch file as part of Executing an External Program, the batch file simply doesn't run at all.
I tried a couple of other formats but nothing worked.
C:\Program Files\HostMonitor3\serverdown.bat %TestName%
"C:\Program Files\HostMonitor3\serverdown.bat %TestName%"
But when I change it back, it works.
C:\Program Files\HostMonitor3\serverdown.bat
What am I doing wrong? What is the correct syntax/format for the External Program field?
External Program syntax
The first entry would try to execute the "program": C:\ProgramC:\Program Files\HostMonitor3\serverdown.bat %TestName%
"C:\Program Files\HostMonitor3\serverdown.bat %TestName%"
The second entry would try to execute the "program": C:\Program Files\HostMonitor3\serverdown.bat %TestName%
Try this one: "C:\Program Files\HostMonitor3\serverdown.bat" %TestName%