我有一个从 ac# 调用执行的 powershell 脚本(例如 Process.Start(powershell.exe file.ps1);)
notepad.exe filename
然而,这似乎会阻止脚本完成,因为在关闭记事本对话框之前不会触发完成事件。
有没有办法让我启动 notepad.exe 但让脚本完成执行。也许我错过了一个powershell的东西。最好是允许 file.ps1 的其余部分被阻塞,而只有该行是异步的。
我有一个从 ac# 调用执行的 powershell 脚本(例如 Process.Start(powershell.exe file.ps1);)
notepad.exe filename
然而,这似乎会阻止脚本完成,因为在关闭记事本对话框之前不会触发完成事件。
有没有办法让我启动 notepad.exe 但让脚本完成执行。也许我错过了一个powershell的东西。最好是允许 file.ps1 的其余部分被阻塞,而只有该行是异步的。