mekanophil
Posts: 14
Joined: Wed May 12, 2010 9:06 pm

Upgrade Problems

I'm attempting to upgrade an older version of our product (built with InstallShield) to a newer version built with Advanced Installer. My setup as is follows:

- In Project->Options on the Project IDs tab, I have set the upgrade code to that of our old product.
- In the Upgrades section, I have:
- "Automatically upgrade older product versions" selected
- "Customize Advanced Installer upgrade rules" is checked

I have a couple of problems. First, the "Customize Advanced Installer upgrade rules" setting is not saved. When I save the project and reopen it, it is no longer checked. The upgrade rules that are displayed are the ones I want (I have not edited them). Do I even need to check the box in this case? Or are those the rules that are applied by selecting "Automatically upgrade"?

The more important thing is that older versions of the product are not being removed from Add/Remove Programs. When I run the setup it says "Found <GUID>" (where GUID is the Product Code of our old product), and it appears to remove it. However, after setup is complete there is still an entry in the Add/Remove programs list for the old product. If I try to remove it, I get an error that says "1628: Failed to complete installation", then the entry is removed from the list.

I'm using Windows XP, and I am an administrator. Please advise. Thanks!

Sam
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Upgrade Problems

Hi Sam,
First, the "Customize Advanced Installer upgrade rules" setting is not saved. When I save the project and reopen it, it is no longer checked.
If the upgrade rules are not customized, there is no point in showing them. This is why the option is reset (the default upgrade rules become hidden again).
Do I even need to check the box in this case? Or are those the rules that are applied by selecting "Automatically upgrade"?
No, this option should be used only when you want to customize the rules.
The more important thing is that older versions of the product are not being removed from Add/Remove Programs. When I run the setup it says "Found <GUID>" (where GUID is the Product Code of our old product), and it appears to remove it. However, after setup is complete there is still an entry in the Add/Remove programs list for the old product. If I try to remove it, I get an error that says "1628: Failed to complete installation", then the entry is removed from the list.
I'm not sure why this happens. Is the old version installed per-user or per-machine? Also, can you please send us the .AIP (project) file you are using and a verbose log of the upgrade process to support at advancedinstaller dot com so we can investigate them?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mekanophil
Posts: 14
Joined: Wed May 12, 2010 9:06 pm

Re: Upgrade Problems

Hi Cosmin,

Thanks for the reply. I realized as I was typing out the first "problem" that it was probably working as designed.

With regards to the upgrade and the orphaned entry in Add/Remove programs, I think I have found more information on the topic. With an InstallShield InstallScript MSI (which is what we used for the old version of our product), there are extra entries made in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall. Specifically, the one that remains after the upgrade is:

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield_{GUID}
Or, in a 64-bit environment:

Code: Select all

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield_{GUID}
There are some others as well, but the one above is the one that must be removed in order to remove the product from Add/Remove programs. There are also some temp files that are left around in <ProgramFiles>\InstallShield Installation Information\{GUID}. Temp files aside, is there an elegant way to get rid of the extra registry keys? Otherwise, can you give me any pointers as to the best way to go about this? I'm assuming I would need to add a custom action, but beyond that I don't have a great idea how to go about it.

We do not allow our product to be installed per-user, it is always per-machine. I sent the AI project and log files to support as requested, in case it will help. Any assistance you can provide is very greatly appreciated.

Sam
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Upgrade Problems

Hi Sam,

The project you sent seems to be configured correctly, so most likely the problem is caused by the extra Uninstall registry entries. To remove them you can use a registry key removal in the "Registry" page. Please note that in this page you need to manually create the registry path you want to remove.

To delete files which are ignored by the uninstall process you can try using file removal operations.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mekanophil
Posts: 14
Joined: Wed May 12, 2010 9:06 pm

Re: Upgrade Problems

Hi Cosmin,

Thank you. Is there any way to do this dynamically? I won't know the registry keys or directory I need to delete ahead of time. Basically, I need to:

1) Find the installed product code associated with my upgrade code.
2) Delete the extra registry key with that product code (if it exists).
3) Delete the temp files in the directory with that product code (if it exists).

Any assistance you can provide is greatly appreciated.

Best Regards,
Sam
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Upgrade Problems

Hi Sam,

This can be done by using a custom action. You can use the Windows Installer API to enumerate all installed products and get information about the ones with upgrade code you want. After that, the custom action can remove the resources you want.

Another solution is to create removals for each product code you released.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mekanophil
Posts: 14
Joined: Wed May 12, 2010 9:06 pm

Re: Upgrade Problems

Thanks Cosmin, I'll look into your suggestions. I appreciate the help.

Best Regards,
Sam

Return to “Common Problems”