Using the 'start' Shell Command
Windows Only (Windows NT/2000/XP Only)

> I am starting a shell-command that writes a
> temporary file (do_this_and_that.vbs) and let it
> be processed by the windows scripting host.
> (OK, there are actually two shell-commands ;-)
>
> Works fine so far, but the consolewindows pop up
> every time, even if the hideconsolewindows is set to true.

If you use Windows shell "start" command, first "get the shellCommand" in MC on your system. for "command.com" on, e.g., Win 98
use start command's /m option
(for list of options, enter start at the prompt)
This will put a button in the start bar for the minimized command window - the best I can suggest.

for "cmd.exe" on, e.g., Win XP
use start command's /min or /b option
(for list of options, enter help start at the prompt) (command.com also available but different behavior than on Win 98)

Note that you can combine two or more shell commands in one MC get shell() by using the "&" character, as you might have to do with a path with spaces in the name. For example, for the shellCommand "cmd.exe", in order to execute

C:\Path with spaces in name\myprog.exe
since "cd" is immune to spaces in path but "start" isn't, use
get shell("cd C:\Path with spaces in name & start /min /high /wait myprog.exe")

Posted 11/5/2002 by Richard K. Herz to the MetaCard Mailing List   (See the complete post/thread)