Run WIN32 App as service

  • Thread starter Thread starter holdgaj
  • Start date Start date
Srvany.exe: Applications as Services Utility - Windows XP Resource Kit
http://www.microsoft.com/downloads/...69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

* Once installed, open Helpctr to learn more about srvany.exe and instsrv.exe

FireDaemon :: Install and run Win32 applications as Windows NT/2K/XP/2K3/Longhorn services:
http://www.firedaemon.com/

--
Ramesh, Microsoft MVP
Windows XP Shell/User
http://www.mvps.org/sramesh2k

Windows 2000 Group Policy Registry Table:
http://www.microsoft.com/windows2000/techinfo/reskit/en-us/gp/gpref.asp

Can anyone help me to run a WIN32 app as a service ?
 
The Dutch version of C'T magazine (German) june 2004 page 52 has an
article about this.
It's sometimes possible to let Service Control Manager start programs as
a Service, most programs are not designed to follow the commands issued
by SCM.

There is a tric.
1. Download Srvany.Exe from MicroSoft or get it from the NT, 2000 or XP
resource kit.
2. Unpack Srvany.Exe to a folder, like System32 in the Windows folder,
then open a command window and issue command:
sc create <servicename> binPath= c:windows\system32\srvany.exe

"servicename" may be anything, like "Myservice1" but not identical to a
service already present
A space between = and the drive should be present.

Tool Sc.exe is part of XP, 2000 users can download from MS.

Open RegEdit,
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControSet\Services\<servicename>
Generate new subkey with name Parameters
This receives new created parameters like "Application" with value name
and path of the program to be started as service, like C:\Program
Files\Server\Server.exe.

Etc. etc
I'm no specialist, just trying to translate, may contain mistakes and is
only part of the text.

There is also a batchfile to do this for lazy people named PaD.bat.
command: pad.bat <servicename> <pathname of program> <options>

If you need more info just ask and I will try to translate.
 
Back
Top