Prompt user if Upgrade - 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!

jsheldon
Posts: 10
Joined: Mon Feb 15, 2010 11:07 pm

Prompt user if Upgrade

I need to check if there is a previous version installed and ask the user if they want to continue with an upgrade.

How do I do this?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Prompt user if Upgrade

Hi,

If an older version is located on the machine Windows Installer will automatically set the property OLDPRODUCTS. If the property is empty it meas no older version is found.

To let the user decide if it will install the application side by side or remove the old one you can use the predefined dialog "UpgradeDlg", just go to
Dialogs page and add it.

This article explains how to display a dialog based on the value of a property, in your case you can use OLDPRODUCTS.
http://www.advancedinstaller.com/user-g ... ialog.html

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jsheldon
Posts: 10
Joined: Mon Feb 15, 2010 11:07 pm

Re: Prompt user if Upgrade

I like the dialog for upgrading but I want them to have the option to upgrade or quite. I don't want them to have side by side installs.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Prompt user if Upgrade

Hi,

Unfortunately there is no built-in support for this. However, you can try using a custom action:
- use a win32 DLL or VBScript custom action so you can control the installation through its return code
- make it prompt the user about the upgrade (for example a simple message box)
- based on the response return 0 to continue or 1602 to stop the installation
- condition this custom action with OLDPRODUCTS property

You can find a sample C++ DLL custom action in our user guide.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”