how to create a service from an exe on windows xp 2000 nt : executable to daemon mode
C:\> Instsrv.exe srvany c:\windows\system32\srvany.exe
Create a New Key: Parameters
Under this create New string values:
back at your prompt type:
Services and Applications -- Services
get the properties on srvany
Click the Log On tab
check the box:
Allow Service to interact with the desktop
This doesn't seem as relevant:
There is a commandline option to turn a windows .exe into a running service, so if you want to try this look at sc.exe:
The Windows NT Resource Kit provides two utilities that allow you to create a Windows NT user-defined service for Windows NT applications and some 16-bit applications (but not for batch files).
Instrsrv.exe installs and removes system services from Windows NT and Srvany.exe allows any Windows NT application to run as a service.
Adding Service (Note: Space between binpath= and "C:\ has to be there.
C:\>sc.exe create "myServiceName" binPath= "C:\myService.exe"
C:\>sc.exe delete "myServiceName"
C:\>sc.exe start "myServiceName"
C:\>sc.exe pause "myServiceName"
C:\>sc.exe stop "myServiceName"
You can use Sc.exe to help develop services for Windows. Sc.exe, which is provided in the Resource Kit, implements calls to all of the Windows service control application programming interface (API) functions. You can set the parameters to these functions by specifying them on the command line. Sc.exe also displays service status and retrieves the values stored in the status structure fields. The tool also lets you specify the name of a remote computer so that you can call the service API functions or view the service status structures on the remote computer.
Listed below are links to blogs that reference this entry: how to create a service from an exe on windows xp 2000 nt : executable to daemon mode.
TrackBack URL for this entry: