home
Running Syslserve as a service
The zip and the installation contains 3 files to make it easier to run syslserve as a windows service, namely:
- installservice.bat - this installs syslserve as a service
- removeservice.bat - this wil remove the syslserve service
- srvany.exe - utility that makes it possible to run anything as a service
Running installservice.bat in the directory you installed syslserve will be enough to get syslserve run as a service.
Customize the service installation
The installservice.bat creates the needed register settings. This is the file you want to customize to your own liking.
The content of installservice.bat included looks like:
@echo off
%~dp0INSTSRV.EXE "Syslserve" %~dp0SRVANY.EXE
del regfile.reg
>>regfile.reg ECHO Windows Registry Editor Version 5.00
>>regfile.reg ECHO.
>>regfile.reg ECHO [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Syslserve\Parameters]
SET MyApplication="%~dp0syslserve.exe -r -fs 5000 -od C:\output\ "
SET MyApplication=%MyApplication:\=\\%
>>regfile.reg ECHO "Application"=%MyApplication%
>>regfile.reg ECHO.
>>regfile.reg ECHO.
regfile.reg
del regfile.reg
pause
1) The batch file runs instsrv.exe that will create a service with the name Syslserve running the service executable srvany.exe.
2) If there is a regfile.reg still present the batch file makes sure it gets deleted
3) The 9 lines following that will append the contents to te regfile.reg, these register settings are used by srvany.exe
4) after it's all write the regfile.reg is called, and the register settings are applied
5) Clean up the regfile.reg, it's nog needed anymore