RUNCMD

0 Likes

By Bryan Keadle



For our ZENworks NAL objects, when using run Launch scripts, I would normally use "cmd /c" as the "Script Engine" to process the script as a batch file.





Unfortunately, this will throw up a DOS box. Sometimes this is undesired, but I have found no way to have "cmd /c" run minimized by default. RunCmd.exe is a utility that will enable me to not only run this command in a minimized window, but even HIDDEN if I want. By simply replacing the Script Engine value with:





The run script of this NAL object is hidden from view.



There are other uses for this utility besides NAL's Run Scripts -- such as scheduled processes or other administrative scripts.



SYNTAX: RunCmd (program) (ICON|MIN, ZOOM|MAX, HIDDEN) (NOWAIT) (QUIET)

Program: command line (and parameters) to execute
ICON or MIN: run command in a MINIMIZE window
ZOOM or MAX: run command in a MAXIMIZED window
HIDDEN: run command in a HIDDEN window
NOWAIT: run program and exit, don't wait for program to complete
QUIET: hide RUNCMD's processing window


By default, RunCmd will run the program in a Normal window, and wait for it to finish before it terminates.



I have a similar utility, RunHide found here, however it serves a different purpose, and each has unique options.

Tags:

Labels:

How To-Best Practice
Collateral
Comment List
Anonymous
Related Discussions
Recommended