Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Upgrade is not detecting product code of installed product.


6 replies to this topic

Nishikant

Nishikant
  • Full Members
  • 3 posts

Posted 18 May 2016 - 05:50

Summary

========

I wanted to block upgrade of existing product and want to display warning message to User to stop processing further and do fresh install. (There are few other issues, due to which we want to do processing in this way only). I can see Product code(of installed product) in registry. But failed to detect the same through changes in .ism.

 

Changes made in .ism file

=====================

- Changed package code/ product version and rest of the things are unchanged.

- Added CA, which will detect existing product version and will trigger pop up message to stop installation.

- In Upgrade setting, "Detect only" is set to Yes and "Detect property" is ISACTIONPROP1. In CA, somehow ISACTIONPROP1 is not getting filled. In maintenance mode, FindRelatedProducts in not getting called and thus ISACTIOPROP1 not getting filled.

- I'm on 64 bit machine and installing 32 bit application.  Reading of registry keys in this scenario, had been taken care.

 REGDB_OPTIONS = REGDB_OPTIONS | REGDB_OPTION_WOW64_64KEY;

- In Sequence, my CA is always get invoked after FindRelatedProduct.

 

Few shots from logs

================

MSI © (EC:C4) [17:20:15:094]: APPCOMPAT: looking for appcompat database entry with ProductCode '{xxxxx-xxxx-xxxx-xxx}'.
MSI © (EC:C4) [17:20:15:094]: APPCOMPAT: no matching ProductCode found in database.
 
Action start 17:20:15: FindRelatedProducts.
MSI © (EC:C4) [17:20:15:158]: Skipping FindRelatedProducts action: not run in maintenance mode
Action ended 17:20:15: FindRelatedProducts. Return value 0.
 
I'm not able to locate what went amiss. Can anyone please help me to locate the same?

 

Thanks,

nishikant.



deramor

deramor
  • Full Members
  • 187 posts

Posted 18 May 2016 - 16:27

First, let me make sure I understand what you are trying to do.

 

1. You have a product with potentially many versions released or to be released.  You have a requirement to force users to uninstall your product before moving to a newer (or older) version.

 

2. You have a version released and are about to release another. Call them version A and version B.

 

Installshield basic msi projects have a upgrade item called ISPreventDowngrade usually by default.

You might want to simply add another upgrade item with the opposite settings.  I.E. "ISPreventUpgrade"

 

You will need to have a unique property for this upgrade item and create your own Customer action error with appropriate messages to a user but I think this is the easiest way to implement what you want to do.

 

With both the normal ISPreventDowngrade and your custom ISPreventUpgrade major upgrade items, you will only even be able to install a fresh product.  That is without any other version installed.  The great thing about this is that normally, installs come with a prevent downgrade functionality anyway.  So if your version A is already in the wild, all you'll need to do is modify your yet to be released version B with this new logic.

 

One potential issue with this method is that I am not sure how automatic you can make changing or updating the settings in the custom major upgrade item I am suggesting to create.  You may need to change this value every time you change your product version.  There is likely a Automation Interface function to help with this however.



am.medhekar@gmail.com

am.medhekar@gmail.com
  • Full Members
  • 1 posts

Posted 23 May 2016 - 08:26

Hi Nishikant,

 

If your requirement is just to prevent an upgrade of a product, then there is a simple step to do this in InstallShield installer.

Just go to Media tab -> Upgrades -> Prepare Setup for upgare scenario -> Upgrade Windows Installer setup
Then from right side option just select Disable.
So it will disable an upgrade of current product & it will abort the setup.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 May 2016 - 11:56

We need to look at two different scenarios here:

 

If you only change the PackageCode (and ProductVersion) this is called a Minor Update. The Major Update mechanisms like FindRelatedProducts, Major Upgrade Settings, ISPreventDowngrade, adding a Major Upgrade item with "detect only" etc. do not apply in this case. For this scenario, follow am.medhekar's advice and set the Small/Minor Upgrade Settings to "disable".

 

However if you also change the ProductCode (but keep the UpgradeCode unchanged) this is called a Major Upgrade and the aforementioned mechanisms will work. The Small/Minor Upgrade Settings will not apply in this case.

With a Major Upgrade you could also automatically uninstall the previous version, saving your users the manual step.



Nishikant

Nishikant
  • Full Members
  • 3 posts

Posted 29 May 2016 - 10:31

Thanks everyone for your comments.
 
For Minor/ Small upgrade, disabling upgrade is working. 
 
For major upgrade, of few older versions, above changes will not work. For blocking upgrade for older versions(in which product code is different) I'm still facing issues.
- @deramor, I haven't understood, from where we will get value for "ISFOUNDNEWERPRODUCTVERSION" (or somewhat similar variable) in "IsPreventUpgrade" case. I believe this happens automatically. Is that correct ?
 
- FindRelatedProduct is not getting executed successfully. Now I'm getting following error,
 
Action 12:53:10: FindRelatedProducts. Searching for related applications
Action start 12:53:10: FindRelatedProducts.
MSI (c) (C8:C4) [12:53:10:201]: FindRelatedProducts: current install is per-user.  Related install for product '{079EAED5-4EC7-4A9D-A863-4D3F67814849}' is per-machine.  Skipping...
Action ended 12:53:10: FindRelatedProducts. Return value 1.
 
What I understood, after searching on web is - You can't upgrade per machine installations with per user installation. But I don't want to upgrade, I simply want to detect old installation. Which is working, but FindRelatedProduct is not getting executed successfully even in Major upgrade scenario.

Edited by Nishikant, 30 May 2016 - 07:13.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 02 June 2016 - 11:01

Yes, if it's installed in a different context (different user oder per machine) it will not be detected as "related product".

Does it really make sense for you to allow per-user installs in the first place?



Nishikant

Nishikant
  • Full Members
  • 3 posts

Posted 02 June 2016 - 11:46

By default, ALLUSERS=0 or ALLUSERS="" , which means it is per user installation. I'm working on legacy code and not sure about making installation - per user. But looks like it was because of default value. After making installation - per machine, things are working perfectly fine. :) 

 

Thanks everyone for your time :)