Re: Hiding the command window when using system() on Windows

Wes Gamble
Sat, 11 Nov 2006 19:55:21 -0000

David Mullet wrote:
> Using the win32ole library, you could call the Run method of the
> Wscript.Shell object...
>
>
> require ''win32ole''
> cmd = "application.exe"
> windowstate = 0    # hidden
> wait = 1    # wait for process to complete
> WIN32OLE.new(''Wscript.Shell'').Run(cmd, windowstate ,
wait)

David,

This:

  WIN32OLE.new(''WScript.Shell'').Run(command_str, 0, 1)

did the trick!!!

Thanks so much for the help.