-1

I have a script that i want to run on a windows vserver (windows server 2016) but when i close the remote desktop the script doesn´t continue. Is there any way that i can make this script run on that server? Thanks in advance

  • 1
    Possible duplicate of [Keeping AutoIt-controlled remote desktop session "alive"](https://stackoverflow.com/questions/5528412/keeping-autoit-controlled-remote-desktop-session-alive) – Andreas Aug 14 '17 at 04:35

2 Answers2

0

From your question i assume it is a task that has to run in the background and you do not want to start/stop it frequently, you could register your script application as a service using sc.exe. Take a look at the syntax here.

Note:
You will need administrator privileges for register, so you need to be admin to start and stop a service or an admin have to grant these permissions if it is possible in your case.

int ermedi_8
  • 171
  • 1
  • 14
0

You can run your script by Task Scheduler. Create new task and mark these options: "Run whether user is logged on or not", "Do not store password", "Run with highest privileges".

Also you can try to use Psexec tool from PsTools package for remote start.

matrix
  • 513
  • 3
  • 8