Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

Services are missing after product upgrade

ear Advanced Installer Support Team,

We experienced a strange problem mostly on Windows Server 2016 machines (it happens on those machiens almost every time, while it happens on Windows Server 2012 machines just rarely): during an upgrade of our product our installer - built with Advanced Installer 14.5.1 but we also tried out your latest version - could not remove the services of the old product. Service removal were hanging, therefore new services could not be installed -> all services were gone.

The error appears in EventViewer while our product is being upgraded is the following:

Product: PRODUCTNAME -- Error 1923. Service 'SERVICENAME' (TheWebService) could not be installed. Verify that you have sufficient privileges to install system services.

In our .aip we enabled "Run as administrator" checkbox, so that UAC dialog always appears asking us for elevated privileges.

We found an interesting link:
https://stackoverflow.com/questions/205 ... tion-error
If we close all the applications which are listed in the accepted answer, then the upgrade is able to replace all the services without any problems.

Did you experience anything similar? Do you have any hints how we could make it working in a reliable way?

Best regards,
Zsolt
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Services are missing after product upgrade

Hi Zsolt,

I don't remember encountering this problem before, however it seems that this is a known limitation. The services cannot be deleted when certain applications are open.

In order to avoid this, you can use the "Terminate process" custom action to stop those application at the beginning of the installation.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

Re: Services are missing after product upgrade

Dear Eusebiu,

We invested some more time into investigating this issue, because it causes bigger and bigger troubles for our customers: in certain cases our Installer just stops the execution with the error message I already mentioned, at this point the customers have to either figure out which applications to close or perform a reboot. Both options are annoying for them.

I create a small sample project with a single EXE file in it which is a service. Nothing special. I also generated 3 executables with some meaningful names:
MyTestServer_1.0.exe
MyTestServer_1.1_Major.exe
MyTestServer_1.1_Minor.exe

The Major and Minor versions are all the same, I did not touch the .aip project, just generated the .exe-s in different way (Generate new or Keep existing).

Interestingly if I install version 1.0 and then 1.1_MINOR, then our Installer recognizes that some files might be blocked by the OS, and offers the reboot in the middle of the installation procedure. This is perfectly fine for us, this would be the preferrabble way. As far as we remember, in the past it always happened like this.

However installing version 1.0 and then 1.1_MAJOR is not showing us any notification about a potential reboot request, but it shows as the error I already described.

Since MINOR and MAJOR behaves in a different way - which cannot be our fault, since we didn´t touch the project in between - we have a feeling it an AI issue that you could fix in AI itself.

For better understanding I´ll send you some screenshots and executables via email.

Best regards,
Zsolt
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Services are missing after product upgrade

Hi Zsolt,

I tested the packages that you sent and, indeed, I reproduced the behavior that you described, but it seems that it is caused by the fact that your service requires a computer restart in order to be completely removed. I did not find any way to remove it without a machine restart, even outside your sample packages.

The difference between major and minor upgrades appears because a major upgrade first try to uninstall the old version (including the service) while a minor upgrade applies the changes from the new version over the old one (without trying to remove the service).

The solutions that I can think of are as follows: either try to investigate why your service requires a restart after removal and try to change this or always require a machine restart after the uninstallation of the old version.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 342
Joined: Fri May 29, 2015 10:36 am

Re: Services are missing after product upgrade

Hi Eusebiu,

Could you please tell me what did you mean by:
"always require a machine restart after the uninstallation of the old version"
Can I set it somehow in the .aip project?

Best regards,
Zsolt
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Services are missing after product upgrade

Hi Zsolt,

Please take a look on the "Reboot after uninstall and during upgrade" thread which describes the solution that you need to implement in your package.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”