Notification about minor 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!

aulyan
Posts: 9
Joined: Thu Jun 14, 2012 11:34 am

Notification about minor upgrade

Hi guys,

How to detect a minor upgrade or is there some property like NOTIFY_IF_MINOR_UPGRADE?
PATCH property does not seems to be set during minor upgrades, also I could not find any property related to minor upgrade.

Thanks for help,
Artem
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Notification about minor upgrade

Hi Artem,

Unfortunately there's no property to detect a minor upgrade.
- a minor upgrade needs to have the product code changed whereas the patch doesn't
- a minor upgrade is differentiated by the the fact that it increments the second field of the ProductVersion property while changing the product code from one version to the next

However the product code of any installed minor upgrade is stored in OLDPRODUCTS during the upgrade. The property is a list with the Product Codes of the older versions of your installation package. This property is set only in a package which upgrades another package.
You can store the product codes of minor upgrades in you package as public properties and check if they are contained within OLDPRODUCTS. Something like:

Code: Select all

OLDPRODUCTS >< YOUR_MINOR_UPGRADE_PRODUCT_CODE
Where YOUR_MINOR_UPGRADE_PRODUCT_CODE property stores the product code of a minor upgrade you released.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aulyan
Posts: 9
Joined: Thu Jun 14, 2012 11:34 am

Re: Notification about minor upgrade

Thanks for reply!

By minor upgrade I mean upgrade from 1.0.0.1 to 1.0.0.2. What happens in this case, i can see that old version gets uninstalled before the new installation, how can I detect that?
In my environment OLDPRODUCTS is not set during such upgrade.

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

Re: Notification about minor upgrade

Hello Artem,

This is happening because you're using four digits in the version numbers. Here's a thread that clarifies this.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aulyan
Posts: 9
Joined: Thu Jun 14, 2012 11:34 am

Re: Notification about minor upgrade

I see, thank you. Please help me to understand one more thing.

I am doing patch upgrade by changing the 3-rd number of ProductVersion field. How to detect this kind of upgrade?

I tried to search for PATCH and OLDVERSIONS (which is default AI upgrade rule, it is present in my project) in logs, no success. I tried to put Message Box custom action with [OLDPRODUCTS] - [PATCH] data, it always says " - ", which mean no props were set.
I also tried to play with options "Install MSI as minor upgrade" (Media->Configuration) and "Install new version first and then uninstall old version" (Upgrades->Order) with no success either.

Once more, my goal is to notify a user about upcoming upgrade. For major upgrades it works fine. But for pathches I am unable find a prop to build the condition.

Thanks for you help,
Artem
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Notification about minor upgrade

Hi Artem,
I am doing patch upgrade by changing the 3-rd number of ProductVersion field. How to detect this kind of upgrade?
If you created the patch right, then the PATCH property should correctly detect it. This property can be used as a custom action condition for example. Can you please describe the notification mechanism you implemented and how are you trying to use the property to condition it?

The patching mechanism requires careful settings and can easily be broken if everything is not according with the guidelines. Is the patch you are trying to detect installing properly on the target machine?

The best updating notification and user experience can easily be achieved by using the Advanced Updater.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aulyan
Posts: 9
Joined: Thu Jun 14, 2012 11:34 am

Re: Notification about minor upgrade

I am attaching example project with Message Box custom action, which triggers on PATCH property.
The output folder contains two .exes, first is simple 1.0.0 and second is patch created by following steps:
- Change ProductVersion to 1.0.1
- Build the project and choose Patch upgrade policy in popup dialog from the IDE.

To reproduce the issue I tried to:
- Install 1.0.0
- Install 1.0.1
- No Message box at all

Please advise,
- Artem
Attachments
AI_Installer.zip
Example project
(581.97 KiB) Downloaded 310 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Notification about minor upgrade

Hello Artem,

Authoring a patch is described in our Authoring a Windows Installer patch tutorial.
Also, the "Confused about patching" thread has some other relevant links to patch basic information you need to know before implementing anything in your main project.

We recommend you perform the steps from the tutorial and test PATCH property using the result projects.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aulyan
Posts: 9
Joined: Thu Jun 14, 2012 11:34 am

Re: Notification about minor upgrade

I read all the documents you advised and realized that patch is not what I am looking for. I do not want to distribute patch as different file.
What I need is minor upgrade. Please confirm that with option "Install MSI as minor upgrade (if applicable)" and by changing the ProductVersion (ProductCode stays the same) I automatically use minor upgrade?
Also note that by changing ProductVersion I am forced by IDE to choose Patch updating method, I consider it will behave as minor upgrade during 1.0.0.exe -> 1.0.1.exe upgrade (based on http://msdn.microsoft.com/en-us/library ... 85%29.aspx).

If it is a minor upgrade do you know how to detect it in custom action's condition field?

Thanks,
- Artem
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Notification about minor upgrade

Hello Artem,
What I need is minor upgrade. Please confirm that with option "Install MSI as minor upgrade (if applicable)" and by changing the ProductVersion (ProductCode stays the same) I automatically use minor upgrade?
Yes, in this case you would be using minor upgrade installed similar to a patch (the old version .MSI is used to perform a repair operation).
Also note that by changing ProductVersion I am forced by IDE to choose Patch updating method, I consider it will behave as minor upgrade during 1.0.0.exe -> 1.0.1.exe upgrade
Indeed, choosing patch when prompted actually keeps the same product code which is fine if you want a minor upgrade as defined by Microsoft.
If it is a minor upgrade do you know how to detect it in custom action's condition field?
You can add a search from the Search page:
search.jpg
search.jpg (20.86 KiB) Viewed 7198 times
In the "Product Code" field, you'll have to keep in mind to have the same current package's product code.
In the "Maximum" field, you'll have to keep in mind to have the same current package's product version.
This way you can use the search name to condition any custom action and it will be executed only during a minor upgrade (because the search will return a value).

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

Return to “Common Problems”