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 downloaded an open source C++ application. This application run as a Linux daemon, listening at a port, and waiting for connection from client PC. Someone has compiled this application under Cygwin so that it can run in Windows environment. The windows version comes with a .exe executable as well as 2 Cygwin DLLs.

I have tried to run this application in Windows XP. When I run the .exe executable in command line, this program is able to put itself to the background and run as a Windows service. When i open the task manager window, i can see that the program is running in the background. Client PC is also able to connect to this program successfully.

However, when i run the same .exe executable in Windows 7, nothing happened. The program failed to start. When I check the task manager window, I couldn't see any process related to this application.

May I know what is the difference between Windows XP services and Windows 7 services?

Since it is an open source program, I would like to modify the program so that it can run in both Windows XP and Windows 7 as a service. Appreciate if anyone can give me some guidance how to do it.


share|improve this question
up vote 0 down vote accepted

One of the big differences between XP and Vista is that services are no longer allowed to use the desktop, so that might be a problem.

Make sure to put your application files in a place that is accessible to the user that executes it, don't put them in your own userprofile directory.

What I would try first is to register your application as a real service instead of calling it directly from the command line. Check out the "sc" application from the command line. You can use "sc create ..." to register your service and then use "sc start ..." to start your service. If something goes wrong check out the Event Log for a possible error message.

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.