This repository contains the legacy code I wrote for SrvStart in 2000, along with some related software. SrvStart allows you to run an ordinary Windows executable as a Windows service.
I am indebted to Sridhar Boovaraghavan ([email protected]) for producing versions of SrvStart and Logger which are compatible with Visual Studio 2017 Community Edition. They are functionally equivalent to the original versions (see below for more details).
I no longer provide support for SrvStart - I am a software architect these days. Also, I no longer have access to a Windows / .NET build and test environment.
You should find the answers to most questions in the documentation in this repository.
In particular, please read the SrvStart FAQ (srvstart/doc/services-faq.pdf
) for instructions on how to get yourself up and running with SrvStart.
I originally wrote SrvStart for Windows NT 4 - yes, that's how old it is! However I have been told that the software works for all subsequent versions of Windows, up to and including Windows 10.
Modify Windows NT service settings at your own peril. Making incorrect changes can render Windows unuseable.
If you don't know what you are doing, don't mess about with services!
I originally wrote SrvStart because I wanted to be able to run the Sybase RDBMS server as a Windows NT service,
and it didn't have native support for that.
Running a program as a Windows NT service means it can be configured to start automatically in the background when Windows starts up,
to restart if it crashes, and to run as a specific user or as the special NT user LocalSystem
.
There are four components to SrvStart.
- SrvStart itself. This comprises an executable program and a configuration file. It is a mandatory component.
- Logger. This is a DLL that SrvStart uses to log error messages. It is a mandatory component.
MSVCRT.DLL
. This is the Microsoft Visual C++ runtime. It is an old version that worked with my programs. You may be able to use a newer version.SVC.EXE
. This is a program that you can use to install services. (You can also use SrvStart itself to install a service. There are better alternatives available nowadays, free or paid-for, if you need more flexibility.)
This repository contains the following artefacts for each component:
- Run-time artefacts (programs and executables) in the file
<component>
_run.zip
. - Documentation in the file
<component>
_doc.zip
. - Complete source code in the file
<component>
_src.zip
. The components are written in C++. - Build artefacts in the file
<component>
_bld.zip
.
- Install the necessary executables and DLLs.
- Create a service configuration file with information on the program you want to run.
- Install the Windows service.
- Start the service.
Full instructions are given in the SrvStart FAQ (srvstart/doc/services-faq.pdf
).
Detailed program and API documentation can be found in srvstart/doc/services.pdf
.
You don't need to build the software to use it - you should be able to install the existing software components as described in the FAQ.
If you want to modify and rebuild the software, you need to use the following files which are compatible with Visual 2017 Community edition:
- SrvStart:
srvstart/srvstart.v120.zip
- Logger:
logger/logger.v220.zip
I am indebted to Sridhar Boovaraghavan ([email protected]) for producing these files. They are functionally equivalent to my original version of SrvStart and Logger.
SrvStart, Logger and SVC.EXE
are all Copyright (C) 1998 - 2018 Nick Rozanski.
The new (VS2017) versions of SrvStart and Logger are Copyright (C) 2018 Nick Rozanski and Sridhar Boovaraghavan.
The software is Free software. You can redistribute it and/or modify it, under the terms of the GNU Lesser General Public License, as published by the Free Software Foundation); either version 2 of the License, or (at your option) any later version.
It goes without saying that this software is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.