Starting a Windows service
I created a simple silent installation script to install a Windows service using the System plug-in created by dselkirk, found here:
http://nsis.sourceforge.net/archive/...php?pageid=345
My script is pasted below. The executable file is a java launcher (created with NSIS) that runs a java program that listens for connections on a specified port.
When I launch rcb_serv.exe (the output file of my service insallation script), the service is created but not yet started (as expected). When I start the service using the Windows service manager, the java program begins running as expected. However, the Windows service manager believes that the service did not start. It throws the error:
Error 1053: The service did not respond to the start or control request in a timely fashion
Am I supposed to do something else in the NSIS script to make the service manager happy? Or is my program supposed to do something to complete the handshake?
Here's my script:
; Service Installer
;--------------
Name "RCB_Service_Install"
Caption "RCB Service Installer"
OutFile "rcb_serv.exe"
SilentInstall silent
AutoCloseWindow true
ShowInstDetails nevershow
!include servicelib.nsh
!define EXE_FILE "rcb.exe"
Section ""
!insertmacro SERVICE "create" "rcb_server"\
"path=c:\Documents and Settings\<my user name>\My Documents\RCB\rcb.exe;\
autostart=1;display=rcb_server;"
SectionEnd