Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
powershell でプロセスを開始するとstart-process、実行完了後に新しいウィンドウが自動的に閉じられることがわかりました。さらにコマンドが閉じるまで待機しておくことはできますか?
start-process
起動時に-noexitパラメータとして渡してみてください。powershell.exe
-noexit
powershell.exe
コマンドプロンプトを起動するということですか?右?もしそうなら、次のスクリプトが役立つことを願っています
Start-Process cmd -ArgumentList '/c','echo test' # auto close Start-Process cmd -ArgumentList '/k','echo test' # keep waiting