hideconsolewindows and windowsscriptinghost

Richard K. Herz herz at ucsd.edu
Tue Nov 5 13:01:01 EST 2002


Klaus Major <klausimausi at mac.com> wrote

> 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)
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)
(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")

Rich Herz
herz at ucsd.edu






More information about the metacard mailing list