Page 1 of 1
Starting service at end of installation
Posted: Thu Jun 22, 2006 5:08 am
by Tinus
Hi,
I want to start a service at the end of my installation. I tried Control Service
with Start on Install and wait for completion, but nothing happend.
Is this command possible at the end of an installation?
Posted: Thu Jun 22, 2006 6:44 am
by MichaelNesmith
Hi Martin!
Since you are actually installing the service you want to start...you want to specify that option in the Install Service command. If you choose "Start Automatically", the service should start at the end of the installation.
Posted: Thu Jun 22, 2006 7:03 am
by Tinus
Hi Michael,
sorry I was not clear enough. I do not install the service, so I can't use this option.
Posted: Thu Jun 22, 2006 7:22 am
by MichaelNesmith
Oh. If the service already exists, Control Service should work then. The only "gotcha" I can think of is that you are specifying the user visible "friendly" name of the service, instead of the actual service name. Should work - try again!
Posted: Thu Jun 22, 2006 7:35 am
by Tinus
I already tried that with no success.
What exactly is the meaning of control:
start on install
start on uninstall
Does this override (disable/enable) the action depending on installation/uninstallation?
Posted: Thu Jun 22, 2006 6:52 pm
by MichaelNesmith
Start on Install starts the named service when Apply Install is called.
Start on Uninstall starts the named service when Apply Uninstall is called.
Posted: Fri Jun 23, 2006 2:04 am
by Tinus
Ok, then this can't work. I tried to start the service in the finish dialog (the
dialog with the checkbox Run $Title$ now). This is after Apply Install.
If I want to run a program I call Run Program $TARGETDIR$\\prog.exe but I
want to start a specific service here if the check box in the finish dialog is
checked. What can I do? I simply want a Control service with start/stop as action.
Posted: Mon Jun 26, 2006 6:00 pm
by MichaelNesmith
Since the service commands are tied to Windows Installer, they execute only when Apply Changes is called.
Since the Run Program command is independent of Windows Installer, it executes directly.
You can tell Windows Installer commands from their syntax highlighting in the script, which is purple by default. Directly executing commands are black.
Please see the help topic titled "Setup Commands Preceding Apply Uninstall", which provides details on a similar, related case.