I have a lot of automation programs adapted from some desktop programs that have been running on Windows servers. Program is too big, and is Win32 C + + written, to convert into a service program takes a lot of effort. I finally found a program called Srvany, which is part of the Windows Resource Kit that simply transforms the program into a service run. The steps are as follows:
Must be performed by administrator
1. Install Windows Resource Kit (Windows Server 2008 is said to be out of support, but no problem after trying)
Installation path C:\ResourceKit
2, run C:\ResourceKit\INSTSRV. EXE MyService C:\ResourceKit\SRVANY. Exe
3, run regedit
Find Hkey_local_machine\system\currentcontrolset\services\myservice
Create a new key called Parameters
In the parameters
Create a new value appdirectory the directory that points to the application
Create a new value application point to the application
Create a new value Appparameters list the run parameters
Execute, no problem
This article is from the "Bluefeather" blog, make sure to keep this source http://bluefeather.blog.51cto.com/9720359/1657612
Simple conversion of Windows desktop programs to service programs