powershell 中的"pause"

 

一直想在ps中实现cmd中pause的效果

开始用sleep,不理想

无意中试了一下 cmd /c "pause"

可以了

之前一直被“执行会新开一个线程”给误导了 看来可能是调用其它程序时会…

----------------------------------

备忘:

  传枚举值,只要使用枚举值的字符串即可 ‘AllDirectories’--

  $a=[diagnostics.process]::start("notepad.exe")

  $a.WaitForExit

 

转载于:https://www.cnblogs.com/mxue/archive/2012/04/28/ps_pause.html

你可能感兴趣的:(powershell 中的"pause")