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!

ales.hrodek
Posts: 65
Joined: Mon Jun 11, 2012 11:40 am

Help with upgrade old product.

Hi,

I have a difficulties with upgrading old products. We had two products which are now merged into one. This require new setup to uninstall previous version. I added old upgrade codes to Upgrade page and set remove product action. It works for one product but not for other one. I've created verbose log and discovered one product is found but not other. Both original installers has been created by Install Shield Express. After more detailed investigation I found one product has record in registry "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products" and is found by AI but other is present in registry "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-21-746137067-1078145449-1202660629-500\Products" and not found by AI. Permissions are not issue as I can uninstall even second product in Control Panel.

I have not found any differences in original ISE project and do not understand why there is different registry key. Unfortunately, Even I will know why is it different does not solve my problem because current users have application already installed.

Is it bug in AI that second product is not found? Is there any way (must be or I am in trouble) how remove all old products?

Thank you,
Ales
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Help with upgrade old product.

Hello Ales,

This may happen if the product which is not found and uninstalled have a different installation type than your current installing product. Please keep in mind that a per-user installation cannot upgrade a per-machine installation and a per-machine installation cannot upgrade a per-user installation. If this is the case, then you can set for your current project the same UpgradeCode as for your old product which is not uninstalled (you can set the UpgradeCode of your project from "Product Details page -> Product IDs tab). Then, you should add an '"Uninstall previous versions" predefined custom action in your current project.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ales.hrodek
Posts: 65
Joined: Mon Jun 11, 2012 11:40 am

Re: Help with upgrade old product.

Hi Daniel,

I found some old products are are not set to per-machine. In my case I cannot use CA "Uninstall previous versions" for simple reason noted in original post. I am merging multiple products into one (two products but in fact 5 different upgrade codes due to their history). For that reason I cannot set new product to same upgrade code. Is there any way how to run this CA with upgrade code parameter. I desperately need remove old products with various upgrade codes as it prevents to run new product correctly.

I have tried following solution in CA but does not know if is safe.
1) Set installer propery - UpgradeCode = old product
2) Uninstall previous versions
3) Set installer propery - UpgradeCode = new product

What do you think? Brilliant would be possibility run "Uninstall previous versions" with optional parameter.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Help with upgrade old product.

Hello Ales,

I apologize for my delayed reply.

Your CA solution is not a recommended approach. In order to achieve what you want you can create a custom action which will use the "MsiEnumRelatedProducts" function to enumerate all ProductCodes of the installed versions of a certain UpgradeCode and for each one of the output entries will run the following command to uninstall them:

Code: Select all

msiexec.exe /x {ProductCode}
Let us know if you have any questions.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”