0

I'm trying to start running an exe from the Windows command line with either PowerShell or CMD that will continue to run after closing the terminal window. I've been able to get the process to start in the background using:

PowerShell:

Start-Process -NoNewWindow [path-to-exe]

CMD:

start /b [path-to-exe]

In both cases the process starts and continues until I close the console, and then the process terminates. Is there a way to bypass the parent/child relationship and keep the process alive?

Eryk Sun
  • 33,190
  • 5
  • 92
  • 111
  • 1
    Possible duplicate of [Start a detached background process in PowerShell](https://stackoverflow.com/questions/25023458/start-a-detached-background-process-in-powershell) – Ken Y-N Oct 06 '17 at 06:48
  • PS: this has nothing to do with the parent/child relationship, just whether or not the child is attached to the console window. – Harry Johnston Oct 06 '17 at 07:11

1 Answers1

2

This ended up working:

start-process powershell -ArgumentList "[path-to-exe]" -WindowStyle hidden