cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
moinkhan
Level 5

How to author MSI package for major upgrade?

Hello,

I was reading the posts from last several months to find out if there is any answer to my problem regarding the major upgrade of a MSI package but I couldnt find the descriptive answer anywhere, even the help file with IS2008 doesnt provide the clear picture of the upgrade process within IS, does anyone know any good tutorial which can explain how the upgrade process works and what properties or tables or customaction required modification in order to accomplish different tasks?

My current problem is that I am using Basic MSI package and if existing package is installed and if I try to install the same package again it should prompt me that existing product already installed and exit the installation rather then showing me the maintenance window.

If anyone know help me on this I really appreciate it.

thanks,
-Moin
Labels (1)
0 Kudos
(11) Replies
nikhilgupta
Level 5

Select the product configuration for the release, and set the value of "generate package code" to yes.
then goto Upgrades view, for small/minor upgrade settings select "disable".
this should meet your requirement.
0 Kudos
jedimaster_mark
Level 7

The issue you're having isn't so much one of what's happening inside IS, but what Windows Installer uses to determine what kind of upgrade it is. You can manipulate the behavior any way you want if you know how these things are determined. This should help you on your way:

http://msdn2.microsoft.com/en-us/library/aa370579(VS.85).aspx
0 Kudos
moinkhan
Level 5

nikhilgupta wrote:
Select the product configuration for the release, and set the value of "generate package code" to yes.
then goto Upgrades view, for small/minor upgrade settings select "disable".
this should meet your requirement.


I already have that setting set to yes and disable, but still when I try to install the package which is already installed on a machine I got the maintenance window.
0 Kudos
Nick_Umanski
Level 7

I don't know if this would work, but if you go to the Upgrade view and select the built in Major Upgrade item "ISPreventDowngrade", and then tick the 'Version Range Inclusive' checkbox. The first version number should be automatically populated with the current version number. Then when you run the installer it will error stating that an earlier version of the product is already installed and abort. Not the most appropiate message but it will stop the installer rather than going into the Maintenance screen - I think.
0 Kudos
RobertDickau
Flexera Alumni

Backing up a bit, in your newer project have you changed the ProductCode and ProductVersion properties (for the latter, changed one of the first three fields) and changed the package code? Have you authored a major upgrade item in the Upgrades view?

To test the deployment, you can generate an MSI log file when deploying the major upgrade, and then searching the log file for FindRelatedProducts and ISSetAllUsers to determine what MSI is looking for and perhaps failing to find.
0 Kudos
moinkhan
Level 5

RobertDickau wrote:
Backing up a bit, in your newer project have you changed the ProductCode and ProductVersion properties (for the latter, changed one of the first three fields) and changed the package code? Have you authored a major upgrade item in the Upgrades view?

To test the deployment, you can generate an MSI log file when deploying the major upgrade, and then searching the log file for FindRelatedProducts and ISSetAllUsers to determine what MSI is looking for and perhaps failing to find.


Yes, on every time I build the package, I update the Product Code, Package Code and Product Version, also I have Major Upgrade setup and following is the value in Upgrade Table:

UpgradeCode: {9284EE81-AB2C-4E05-9CD3-6A79009D97AB}
VersionMin:
VersionMax:***ALL_VERSIONS***
Language:
Attributes:257
Remove:
ActionProperty:ISACTIONPROP1
ISDisplayName:FullUpgrade

and in SecureCustomProperties i have ISACTIONPROP1

Also I have ISPreventDowngrade CA type 19, and Install UI Condition and Install Exec Condition are set to ISACTIONPROP1.

My objective to acheive is to authored the installation which prevent downgrade and at the same time prevent the installation or starting the maintenance if the same version of the product is already installed, but if the earlier version of the product is installed then first completely removed the previous version and installed the newer version.

thanks,
-Moin
0 Kudos
moinkhan
Level 5

....another issue is when I am testing the major upgrade, my installation stops on IsPreventDowngrade CA, even the version I am installing is higher then the one already installed, this is from the log file:

MSI (c) (C8 D0) [13:00:55:504]: Doing action: ISSetAllUsers
Action 13:00:55: ISSetAllUsers.
Action start 13:00:55: ISSetAllUsers.
MSI (c) (C8:BC) [13:00:55:854]: Invoking remote custom action. DLL: C:\DOCUME~1\mkhan\LOCALS~1\Temp\MSI27.tmp, Entrypoint: SetAllUsers
InstallShield 13:00:56: Begin SetAllUsers()
InstallShield 13:00:56: Getting records from Upgrade table
InstallShield 13:00:56: UpgradeCode: {9284EE81-AB2C-4E05-9CD3-6A79009D97AB} MinVersion: MaxVersion: 5.00.0079 Language: Attributes: 257
InstallShield 13:00:56: Checking related product {DC0DC59A-AA74-470F-BE4A-552F618CCFE8}
InstallShield 13:00:56: My System {DC0DC59A-AA74-470F-BE4A-552F618CCFE8} 1033 5.00.0078 ***Related***
MSI (c) (C8!C0) [13:00:56:966]: PROPERTY CHANGE: Adding IS_MAJOR_UPGRADE property. Its value is 'Yes'.
InstallShield 13:00:56: ALLUSERS of related product {DC0DC59A-AA74-470F-BE4A-552F618CCFE8} is = 1
MSI (c) (C8!C0) [13:00:56:976]: PROPERTY CHANGE: Adding ALLUSERS property. Its value is '1'.
InstallShield 13:00:56: End SetAllUsers()
Action ended 13:00:57: ISSetAllUsers. Return value 1.

MSI (c) (C8 D0) [13:00:57:086]: Doing action: FindRelatedProducts
Action 13:00:57: FindRelatedProducts. Searching for related applications
Action start 13:00:57: FindRelatedProducts.
FindRelatedProducts: Found application: {DC0DC59A-AA74-470F-BE4A-552F618CCFE8}
MSI (c) (C8 D0) [13:00:57:086]: PROPERTY CHANGE: Adding ISACTIONPROP1 property. Its value is '{DC0DC59A-AA74-470F-BE4A-552F618CCFE8}'.
MSI (c) (C8 D0) [13:00:57:086]: PROPERTY CHANGE: Adding MIGRATE property. Its value is '{DC0DC59A-AA74-470F-BE4A-552F618CCFE8}'.
Action ended 13:00:57: FindRelatedProducts. Return value 1.
MSI (c) (C8 D0) [13:00:57:086]: Doing action: ISPreventDowngrade
Action 13:00:57: ISPreventDowngrade.
Action start 13:00:57: ISPreventDowngrade.
My Error Message
MSI (c) (C8 D0) [13:00:59:449]: Product: My System -- My Error Message

Action ended 13:00:59: ISPreventDowngrade. Return value 3.
0 Kudos
moinkhan
Level 5

Its working fine now, I did the following steps to make it work:

I created two CA's of type 19, ISPreventDowngrade with UI/EXEC condition of ISFOUNDNEWERPRODUCTVERSION and another with ISPreventMaintenance with UI/EXEC condition Installed And REMOVE<>"ALL", both are scheduled after the FindRelatedProducts sequence. Then I created two Major Upgrade items in Upgrade view, MajorUpgrade with any earlier product version and Detect Only option select to No, and ISPreventDowngrade upgrade item with Detect Only setting set to Yes and property ISFOUNDNEWERPRODUCTVERSION with minimum version set to my current version of the product.
This stop the installation of the product if its already installed and also stop the installation if the future version of the product already installed but start the Major Upgrade if older version is installed.
Let me know if anyone looking for more information.

Thanks Everyone!
0 Kudos
pbrown
Level 3

moinkhan wrote:
Its working fine now, I did the following steps to make it work:

I created two CA's of type 19, ISPreventDowngrade with UI/EXEC condition of ISFOUNDNEWERPRODUCTVERSION and another with ISPreventMaintenance with UI/EXEC condition Installed And REMOVE<>"ALL", both are scheduled after the FindRelatedProducts sequence. Then I created two Major Upgrade items in Upgrade view, MajorUpgrade with any earlier product version and Detect Only option select to No, and ISPreventDowngrade upgrade item with Detect Only setting set to Yes and property ISFOUNDNEWERPRODUCTVERSION with minimum version set to my current version of the product.
This stop the installation of the product if its already installed and also stop the installation if the future version of the product already installed but start the Major Upgrade if older version is installed.
Let me know if anyone looking for more information.

Thanks Everyone!


I am working through the same problem. Can you elaborate a bit of how you fixed this? I'm looking in the Custom Actions and Sequences view and have ISPreventDowngrage under UI and Execute.

Thanks,

Patrick
0 Kudos
moinkhan
Level 5

pbrown wrote:
I am working through the same problem. Can you elaborate a bit of how you fixed this? I'm looking in the Custom Actions and Sequences view and have ISPreventDowngrage under UI and Execute.

Thanks,

Patrick


Did you setup the Major Upgrade items under Upgrade view? and what are the condition you have in place for your CA type 19?

-Moin
0 Kudos
pbrown
Level 3

moinkhan wrote:
Did you setup the Major Upgrade items under Upgrade view? and what are the condition you have in place for your CA type 19?


I've been playing with this all day. I'm beginning to think that this will never work 😞 .

I have a major upgrade option in Upgrades.
Upgrade Code = {BFD824B7-7317-4FE3-86FA-ECC39CFADD9B}
Minimum Version = blank
Include Minimum Version = Yes
Maximum Version = ***ALL_VERSIONS***
Include Maximum Version = No
Language = blank
Exclude Specified Languages = No

Additional Settings:
Detect Only = No
Detect Property = ISFOUNDNEWERPRODUCTVERSION
Only Remove Specified Features = blank
Continue On Failure = No
Migrate Feature States = No


In Custom Actions and Sequences:

Sequences > Installation > Execute

Just after FindRelatedProducts I have ISPreventDowngrade. The properties of that are:

Sequence Tab
Sequence Number = 450
Conditions = ISFOUNDNEWERPRODUCTVERSION
Comments = ISPreventDowngrade

Action Tab
Error Message = [IS_PREVENT_DOWNGRADE_EXIT]
Return Processing = Syncronous
In-Script Execution = Immediate Execution
Execution Scheduling = Always execute
MSI Type Number = 19

Any help you can offer would be great. Sorry if this is information overload.

Regards,

Patrick
0 Kudos