Upgrade msi issue - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

buzz71
Posts: 25
Joined: Tue Nov 02, 2010 11:03 am

Upgrade msi issue

Hi

I am attempting to create an upgrade msi package for an existing product to perform a "Install New Version first then uninstall Old Version" type upgrade.

I am using v8.0.2 of Advanced Installer.

I have created an upgrade package following the instructions on the following link http://www.advancedinstaller.com/user-g ... rades.html.

On completion of the "Upgrades page" - in particular selection of "Install New version first then uninstall old version" a warning dialog was displayed stating:
"
Using this type of upgrade requires that your project fulfils certain conditions. Please see the following link for more details.
Upgrade information

Your project contains some predefined Advanced Installer custom actions that are not compatible with this upgrade order.

- IIS
"

Next I ensured that I answered "yes" to "Changing the product Code" on the "Product Details" page then built the msi.

On testing upgrading the previous version of the software it eventually failed with the following information:
"Installer Information.
The Specified Service alreadys exists."

There are also a number of files (config files) that I would not want to upgrade as they may contain users settings for the application.

So my queries are:
1. Will this upgrade package be possible - I can supply aip file(s) on request.
2. Am I right in thinking that an upgrade package can still be used on a machine where the product has not been installed before?
3. How do I configure the upgrade to avoid the 'service already exists' install issue? Do you have an advanced configuration section for upgrades?
4. Can I avoid 'upgrading' config files on the existing installation?
5. Might I be better to do a 'patch' rather than an upgrade?

Many thanks for your help in advance.

Buz
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Upgrade msi issue

Hi Buz,
On completion of the "Upgrades page" - in particular selection of "Install New version first then uninstall old version" a warning dialog was displayed stating:
Here is an article that explains this setting.
Will this upgrade package be possible
If you follow our recommended settings from the user guide I don't see why not.
Am I right in thinking that an upgrade package can still be used on a machine where the product has not been installed before?
Yes, this is correct. Only a patch requires the old version to be installed on the target computer.
How do I configure the upgrade to avoid the 'service already exists' install issue? Do you have an advanced configuration section for upgrades?
You should define the service's error policy from the Services Page. Also, here is an article that might help you. Since you are installing the new version then uninstalling the old one, you can try to condition the service's component to be skipped during an upgrade. You can do this from the Organization Page and here is how to determine when an upgrade is being performed.
Can I avoid 'upgrading' config files on the existing installation?
Yes, you can. Just follow this link to our tutorial.
Might I be better to do a 'patch' rather than an upgrade?
A patch requires the old version of the application to be installed on the target machine. Here is a link that underlines this.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
buzz71
Posts: 25
Joined: Tue Nov 02, 2010 11:03 am

Re: Upgrade msi issue

Hi Mihai

Thanks for the information - it all looks useful, particularly the preventing config files being overwritten!

I had a question regarding this comment:
You should define the service's error policy from the Services Page. Also, here is an article that might help you. Since you are installing the new version then uninstalling the old one, you can try to condition the service's component to be skipped during an upgrade. You can do this from the Organization Page and here is how to determine when an upgrade is being performed.
It is quite possible that I would want to upgrade the service too as part of the update package rather than just skipping it. Is there an article on how to do this?
Or do you mean just skip the 'install' custom action that installs the service and allow the file to be swapped by the upgrade?
Will this happen automatically even if the service is running at the time of upgrade?

Best Regards,

Buz
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Upgrade msi issue

Hello,
It is quite possible that I would want to upgrade the service too as part of the update package rather than just skipping it. Is there an article on how to do this?
Note that in your case scenario, the service control operation should stop the existing service during install so the installer can overwrite the service files. As a generic guideline, you can follow the service installation article I mentioned in my last post.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
buzz71
Posts: 25
Joined: Tue Nov 02, 2010 11:03 am

Re: Upgrade msi issue

Hi Mihai

I am having trouble setting the Execute condition on the InstallExecuteSequence -> Install of the custom Action to allow me to complete the upgrade.

The original Execute Condition is

Code: Select all

&Feature = 3
i changed it to try to only install if a first time install OR upgrading and the feature does not already exist

Code: Select all

&Feature = 3 AND ((Not Installed) OR (OLDPRODUCTS AND NOT (!Feature = 3)))
On testing the upgrade msi I got "Service already exists" and a rollback

I then tried a simpler approach of only installing if a first time install (which I expected to work):

Code: Select all

&Feature = 3 AND (Not Installed)
Again on testing I got a "Service already exists".

The verbose log revealed the following snippet:

Code: Select all

MSI (s) (54:10) [16:50:11:019]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI12.tmp, Entrypoint: LaunchDotNetCustomAction
MSI (s) (54:B0) [16:50:11:019]: Generating random cookie.
MSI (s) (54:B0) [16:50:11:029]: Created Custom Action Server with PID 3852 (0xF0C).
MSI (s) (54:78) [16:50:12:101]: Running as a service.
MSI (s) (54:78) [16:50:12:111]: Hello, I'm your 32bit Elevated custom action server.
Error 1001. The specified service already exists
MSI (s) (54!34) [16:50:16:066]: 
MSI (s) (54:10) [16:50:16:066]: Leaked MSIHANDLE (3) of type 790531 for thread 3892
MSI (s) (54:10) [16:50:16:066]: Note: 1: 2769 2: MyServer_Install 3: 1 
Info 2769. Custom Action InferMed.ClinicalCoding.Server_Install did not close 1 MSIHANDLEs.
Action ended 16:50:16: InstallExecute. Return value 3.
I have included an attachment of an image of the custom action screen.
Image

Please could you help in pointing out what I am doing wrong here? The upgrade needs to be with customers by end week beginning 4th April and I am getting rather worried about this "Service already exists" blocking the way to the upgrade.

Many thanks in advance.

Buz
Attachments
image of the custom action screen
image of the custom action screen
customactions.jpg (167.94 KiB) Viewed 8172 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Upgrade msi issue

Hi Buz,

What I meant by stopping the service is described in the following post. The described order is the correct one to upgrade your service with your current settings.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
buzz71
Posts: 25
Joined: Tue Nov 02, 2010 11:03 am

Re: Upgrade msi issue

Hi Mihai

As a test I stopped the Windows Service and ran the upgrade msi and continued to get the "Service Already Exists" message so I am not sure this issue is related to the Windows service running.

If you see my last post I think it is related to attempting to do an install of the service when it already exists. When I include the Execute conditions mentioned it still tries to install the service. Please could you advise on what is wrong with these? I can supply the AIP file on request.

Best regards,

Buz
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Upgrade msi issue

Hi Buz,

Please let's continue this discussion via e-mail and if you want, you can post the solution for everyone to see once the result is the intended one.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”