Page 1 of 1

Start and stop a service on upgrade.

Posted: Thu Feb 24, 2011 4:21 pm
by StevenCl
Hi,

I have a simple installer, that installs a service and starts it when it is done.

To this end i have a run program set for "after install"

$windir$\net.exe

paramaters

start myservice

I also have a run program "Before uninstall"

$windir$\net.exe

paramaters

stop myservice

These run fine if you have clicked on the installer package and are installing or uninstalling the package. My problem is these commands are not run if I provided an updated installer and get the user to run it. What I need to happen is

1) stop old service
2) uninstall old service
3)install new service
4) start new service

The files are updated but because the "Run Program" events have not fired, the running version is still the old version. Is there a way to achieve what I need?

Steven

Re: Start and stop a service on upgrade.

Posted: Fri Feb 25, 2011 6:36 am
by giaviv
Dear Steven,

How exactly are you creating the the updated installer? What is it?

Re: Start and stop a service on upgrade.

Posted: Sun Feb 27, 2011 4:17 am
by bokkie
Steve, I've installed quite a few services in the past and they install/start and stop/uninstall without a problem. Further, I've done that using the builtin install and control service functions using MSIcode. That is, I've never had to shell-out and use an external application to control them.