Page 1 of 1

How to install Windows Services with Actual Installer

Posted: Thu Aug 19, 2010 2:20 am
by softsoap
Hi,
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
I hope this will help somebody.

Regards
Soft

Re: How to install Windows Services with Actual Installer

Posted: Thu Aug 19, 2010 3:01 am
by Leo
Thank you for that!

Re: How to install Windows Services with Actual Installer

Posted: Tue Aug 24, 2010 12:57 am
by softsoap
I forgot something.

you should add this one too.

Just to make sure when you update your software you will be able to replace the exe with the new one.

Code: Select all

5 ----------------------------------
Command: <SystemDir>\sc.exe
Parameters: stop "SyncTime"
Show: Hide
Timing: Before Installation
Wait Until Process Finishes : Yes

Re: How to install Windows Services with Actual Installer

Posted: Mon May 09, 2011 10:59 am
by DaniealD
thanks for your great tips to install.