0

how can i run an .exe file 24/7 on a windows server? The script needs to be started manually from a virtual desktop connection and then left it in the background. The problem is that when i close the remote desktop connection the script stops.

VPS: Microsoft Windows Server 2019 with Desktop Experience Locale English AMI provided by Amazon

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Caeldo
  • 1
  • 2
    Create a Windows Service out of it? – Sami Kuhmonen Feb 24 '19 at 17:58
  • 2
    Sounds like you want to create a service: https://stackoverflow.com/a/3582179/2675670 – Richard Feb 24 '19 at 17:59
  • I've installed a windows service with NSSM, but when i launch "sc.exe start mynewservicename" nothing happens – Caeldo Feb 24 '19 at 18:21
  • You will want to check the logs and see what's up. Here's a couple of links to check out... [NSSM cheatsheet](https://gist.github.com/magnetikonline/2217fd95cf15a0324696). [Event viewer command line](https://www.windows-commandline.com/event-viewer-command-line/) – Richard Feb 24 '19 at 18:44

0 Answers0