retargetable destination, changes back to default on re-installation.

  • Thread starter Thread starter EP
  • Start date Start date
E

EP

I have an msi with a default installdir of c:\program files\ProductName
A merge module tied to a feature is configured to [INSTALLDIR]SubProduct

If I install the package and specify a different directory (c:\program
files\NewDir), the module correctly installs to c:\program
files\NewDir\SubProduct.


However, if I go into maintenance mode and deselect the feature, let it
remove, go in again and re-add it, the module reinstalls to
ProductName\SubProduct, not the NewDir that everything else is still
installed to..

Anyone know why this would be?
 
EP said:
I have an msi with a default installdir of c:\program files\ProductName
A merge module tied to a feature is configured to [INSTALLDIR]SubProduct

If I install the package and specify a different directory (c:\program
files\NewDir), the module correctly installs to c:\program
files\NewDir\SubProduct.


However, if I go into maintenance mode and deselect the feature, let it
remove, go in again and re-add it, the module reinstalls to
ProductName\SubProduct, not the NewDir that everything else is still
installed to..

Anyone know why this would be?
Yup,

By default, the MSI will always resolve INSTALLDIR as the default
install folder location, not the one selected during install.

1. You need a CA to set the ARPINSTALLLOCATION at install time.
2. You may (optionnal) save the value of INSTALLDIR in the registry
3. You NEED when rerunning the install (maintenance or remove) mode, to
set the INSTALLDIR to whatever was used during install. Failure to do se
will result in the behavior you described.


Hope this Help

JMP
 
Back
Top