从非子进程的命令行在Windows中启动EXE
我正在尝试从Windows命令行开始使用PowerShell或CMD运行exe,该命令行将在关闭终端窗口后继续运行。我已经能够通过以下方式在后台启动流程: PowerShell:从非子进程的命令行在Windows中启动EXE,windows,powershell,command-line,cmd,windows-console,Windows,Powershell,Command Line,Cmd,Windows Console,我正在尝试从Windows命令行开始使用PowerShell或CMD运行exe,该命令行将在关闭终端窗口后继续运行。我已经能够通过以下方式在后台启动流程: PowerShell: Start-Process -NoNewWindow [path-to-exe] 命令: 在这两种情况下,进程开始并继续,直到我关闭控制台,然后进程终止。有没有办法绕过父/子关系并使流程保持活动状态?这最终起到了作用: start-process powershell -ArgumentList "[path-to-
Start-Process -NoNewWindow [path-to-exe]
命令:
在这两种情况下,进程开始并继续,直到我关闭控制台,然后进程终止。有没有办法绕过父/子关系并使流程保持活动状态?这最终起到了作用:
start-process powershell -ArgumentList "[path-to-exe]" -WindowStyle hidden
PS的可能重复:这与父/子关系无关,只是子项是否附加到控制台窗口。
start-process powershell -ArgumentList "[path-to-exe]" -WindowStyle hidden