I have refined this activity for MX as batch (.cmd) files open a live windows command shell taking focus from whatever you may be doing.
I still have one .cmd file, daily.cmd which;
runs an FTP program to send dayfile.txt to the public website,
copies dayfile.txt to the LAN webserver,
copies (with date selection) NOAA files to the LAN webserver.
Am testing two solutions to run daily.cmd hidden;
1. vbs
Code: Select all
' daily.vbs
' Runs daily.cmd in a new hidden command shell ( the '0' ).
' references - https://msdn.microsoft.com/en-us/library/d5fk67ky.aspx
' Note, if there is a pause or other 'feature' which stops the execution of the .cmd file,
' the hidden shell will be left running but doing nothing.
' Use Task manager to close it.
' invoke shell . Run "this command", hide, wait for command to finish then close hidden shell
CreateObject("Wscript.Shell").Run "C:\CumulusMX\FTP\daily.cmd", 0, True
Wscript.Quit
2. chp.exe This is a small program available here http://www.commandline.co.uk/chp/ you only need the chp.exe program from the download package. This works great from the command line with chp.exe in the same folder as daily.cmd. This also will be left hanging if the batch file fails to complete.
However I am unable to work out how to get this working in the external programs slot(s).
The command line that works is;
full_path_to/chp.exe daily.cmd where chp.exe and daily.cmd are in the same folder.
Both these approaches have the advantage that the daily.cmd file can be run directly if required.
As it takes a day for each alternative in external files to be tested properly any assistance in how external files/parameters work would be much appreciated.