2009-11-17 32 views

cevap

19

İşte bunu yapan bir betik. Orijinal örnek için bkz. Windows PowerShell Blog.

$p = [diagnostics.process]::start("notepad.exe") 
if (! $p.WaitForExit(1000)) 
    { echo "Notepad did not exit after 1000ms"; $p.kill() } 
+11

PowerShell 2.0'da bu ilk satırı '$ p = Start-Process Notepad -passthru 'ile değiştirebilirsiniz. –

İlgili konular