scgellion
Posts: 5
Joined: Fri Jan 16, 2009 3:16 pm

How do I start a service i've added?

Hi everyone
I've created an installer that adds a Windows service during the install process.
This works fine.
What I don't know how to do is to start this service at the end of the installation.
Any examples would be much appreciated.
Thanks
Simon
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Re: How do I start a service i've added?

Hi Simon,

Use the Services page to install and control Windows services. In order to start the service when the package is installed, create a new Service Control operation using the "New Operation" toolbar button, enter the name of the service in the "Service Name" field and set the "Event On Install" to "Start". The "Event on Uninstall" should be set to "Stop" / "Delete".

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
scgellion
Posts: 5
Joined: Fri Jan 16, 2009 3:16 pm

Re: How do I start a service i've added?

Hi Denis
Thanks for this.
I've added this Operation in but unforunately I get an error 2762 when the installation runs.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: How do I start a service i've added?

Hi,

The error 2762 means: "Cannot write script record. Transaction not started." and the Microsoft explanation is:
"The InstallExecuteSequence may have been authored incorrectly. Actions that change the system must be sequenced between the InstallInitialize and InstallFinalize actions. Perform package validation and check for ICE77."

Does your package contain custom actions which change the system? If so, they should be scheduled after the "InstallExecuteSequence" -> "InstallInitialize" standard action. If you cannot find the problem, please send us the AIP (project) file you are using to support at advancedinstaller dot com so we can investigate it.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”