【发布时间】:2012-12-19 20:33:09
【问题描述】:
有人可以帮助在同一个窗口中运行新进程吗?
$credential = Get-Credential
Start-Process powershell.exe -Credential $credential -NoNewWindow -ArgumentList ".\ListScript.ps1" -Wait
Write-Host "Press any key to continue ..."
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
-NoNewWindow 不起作用,但没有 -Credential $credential 它可以正常工作。我该如何解决?
【问题讨论】: