Because Sometimes We Need To Wait For A Windows App
function invokeWithWait-application
{
param([string]$command = $(throw "USAGE: invokeWithWait-application -Command co
mmand [-Arguments arguments]"),
[string]$arguments = "”)
$np = [System.Diagnostics.Process]::Start ($command, $arguments)
$np.WaitForExit()
$np.ExitCode;$np.ExitTime;$np
}
{
param([string]$command = $(throw "USAGE: invokeWithWait-application -Command co
mmand [-Arguments arguments]"),
[string]$arguments = "”)
$np = [System.Diagnostics.Process]::Start ($command, $arguments)
$np.WaitForExit()
$np.ExitCode;$np.ExitTime;$np
}
Categories
My Free Software0 TrackBacks
Listed below are links to blogs that reference this entry: Because Sometimes We Need To Wait For A Windows App.
TrackBack URL for this entry: http://weblog.siliconcerebrate.com/mt/mt-tb.cgi/273
Leave a comment