Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a remote server that I can control over a remote desktop connection program. When I open a program on the server remotely (by remote desktop) and then closing the remote desktop, the opened program stopped working and it continues only when I reopen the session to the server.

What do I need to open a program on the remote server and keep it running continuous, even if I close the remote session?

share|improve this question

You need to make that application run as a service.

share|improve this answer
thanks for reply but can you explain how i make it run as service? – ahmed Jul 26 '11 at 23:36 – MDMarra Jul 27 '11 at 0:30

This might help

basically go into command line on that server

lets say I was going to make notepad.exe run as a background service

so I would do something like

SC Create npadsvc binpath="C:\windows\system32\notepad.exe" start=auto

then this would just run in the background under a system account

an alternative that I've seen done a lot in the past is just to create a generic login for the server / servers, then rather than logging off, just hit the "x" and disconnect the session, processes will continue to run under that user, I do this often when loading various snapshot images that take a long time to mount to a LUN, logon, click click, disconnect, check back later.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.