Start and stop a service on upgrade.

Got a problem you cannot solve? Try here.
Post Reply
StevenCl
Posts: 1
Joined: Thu Feb 24, 2011 4:10 pm

Start and stop a service on upgrade.

Post 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
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: Start and stop a service on upgrade.

Post by giaviv »

Dear Steven,

How exactly are you creating the the updated installer? What is it?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Start and stop a service on upgrade.

Post 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.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
Post Reply