this post is to show you how to install a Windows Service during the installation.
let's say the service name is : SyncTime
Open : Actual Installer
Click on : System
Go on the tab : Commands
You will enter 4 new commands.
1: to install the service after Installation
2: to start the service after Installation
3: to stop the service before Uninstallation
4: to delete the service before Uninstallation
Code: Select all
1 ----------------------------------
Command: <SystemDir>\sc.exe
Parameters: create "SyncTime" binPath= "<InstallDir>\SyncTime.exe" DisplayName= "Sync Time" start= auto
Show: Hide
Timing: After Installation
Wait Until Process Finishes : Yes
2 ----------------------------------
Command: <SystemDir>\sc.exe
Parameters: start "SyncTime"
Show: Hide
Timing: After Installation
Wait Until Process Finishes : Yes
3 ----------------------------------
Command: <SystemDir>\sc.exe
Parameters: stop "SyncTime"
Show: Hide
Timing: Before Uninstallation
Wait Until Process Finishes : Yes
4 ----------------------------------
Command: <SystemDir>\sc.exe
Parameters: delete "SyncTime"
Show: Hide
Timing: Before Uninstallation
Wait Until Process Finishes : Yes
Regards
Soft