$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("whatever_command.exe", 0, false);
From the site:
You can start the process using the Run method of the WScript.Shell object, which is built-in to Windows. By varying the second parameter, you can make the window hidden, visible, minimized, etc. By setting the third parameter to false, Run does not wait for the process to finish executing. This code only works on Windows.
There are a few more strategies on achieving this which are outlined on somacon.com, but this is the one I ended up using. So, check out the page on somacon.com for more info if you'd like. I'd also like to express my thanks for the great tip!
No comments:
Post a Comment