Question

In my installer I have a component that installs an NT service. I have a problem that during minor upgrade the service is not stopped. I observed the log generate by installshield during upgrade and it reports it is doing the action StopServices and its return code is 1. I have also started process hacker to log for services start/stop events but the service is never stopped during upgrade. I have also verified that during uninstall the service in stopped and then removed. Any idea why this is happening?

I am using installshield 2008, but any installshield related answer will be really helpful.

Was it helpful?

Solution

Eventually I was not able to overcome this issue. Spent several days trying to figure out what exactly is going on and was not able to figure out why the service is neither stopped nor started during minor upgrade. I was forced to write custom actions that perform this operations and used sc.exe for them. This is not the first unsolvable issue in installshield that I was forced to fix with a custom action. Hope this answer will save several days to someone.

OTHER TIPS

It can be done by install script and a custom action that executes it.

An example for stopping/starting a service (i used it in IS2016):

#include "ifx.h"

//Function to stop the service
export prototype stopService(HWND);
function stopService(hMSI)
begin
    ServiceStopService ( "my service name" );
end;

//Function to start the service
export prototype startService(HWND);
function startService(hMSI)
begin
    ServiceStartService ( "my service name" ,"");
end;

In order to run the custom action during minor upgrade only, set its condition to:

REINSTALLMODE=vomus
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top