This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Problem in "Major upgrade" install to old (non default) install location
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Feb 21, 2008
02:15 AM
Problem in "Major upgrade" install to old (non default) install location
I have an basic msi installation package.
In some cases user had selected to install the software to say E: drive.
Now when this user had installed newer version of this software package, package did major upgrade (as intended), but when run in silent mode, it installed the software to default location (to C: drive).
Is there a way to probe (say from registry) where the old version was installed previously, and do major upgrade to this old directory instead?
In some cases user had selected to install the software to say E: drive.
Now when this user had installed newer version of this software package, package did major upgrade (as intended), but when run in silent mode, it installed the software to default location (to C: drive).
Is there a way to probe (say from registry) where the old version was installed previously, and do major upgrade to this old directory instead?
(1) Reply
‎Feb 21, 2008
06:24 AM
Hello.
You can read ARPINSTALLLOCATION property of previous version of your install package by using Windows Installer API:
Where:
ProductCode — Product Code of your previous version of product; If you use Upgrade table to detect previous version then Product code of old product can be foun in ActionProperty of old product upgrade table entry.
InstallLocation — Buffer to path.
dwSize — size of buffer.
PS: It works only if Install package of old product save path to ARPINSTALLOCATION property.
You can read ARPINSTALLLOCATION property of previous version of your install package by using Windows Installer API:
MsiGetProductInfo(ProductCode, INSTALLPROPERTY_INSTALLLOCATION, InstallLocation, &dwSize);
Where:
ProductCode — Product Code of your previous version of product; If you use Upgrade table to detect previous version then Product code of old product can be foun in ActionProperty of old product upgrade table entry.
InstallLocation — Buffer to path.
dwSize — size of buffer.
PS: It works only if Install package of old product save path to ARPINSTALLOCATION property.