Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从非子进程的命令行在Windows中启动EXE_Windows_Powershell_Command Line_Cmd_Windows Console - Fatal编程技术网

从非子进程的命令行在Windows中启动EXE

从非子进程的命令行在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-

我正在尝试从Windows命令行开始使用PowerShell或CMD运行exe,该命令行将在关闭终端窗口后继续运行。我已经能够通过以下方式在后台启动流程:

PowerShell:

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