powershell 外部プログラム実行

powershellで外部プログラムを実行するサンプルです。


コマンド一つで実行できます。
同期、非同期はオプションで指定することができます。

Start-Process -FilePath プログラムパス -ArgumentList 引数 -Wait

ノートパッドを起動する場合
Start-Process -FilePath c:\Windows\system32\notepad.exe

-Waitを指定すると、プログラムが終了するまで待ちます。


Bookmark this on Yahoo Bookmark
Bookmark this on Google Bookmarks
Share on LinkedIn
LINEで送る
Pocket