PDA

View Full Version : Changing INSTALLDIR in InstallScript MSI project



ad_ramesh
07-03-2004, 02:50 AM
I have created an InstallScript MSI project which has 4 features. I need to change the Installation path during runtime.

In the Installing Event of each feature, user can specify the installation path using SdAskDestPath Dialog and I am assigning the value to INSTALLDIR, but it still takes the default path for installing the files even after assigning the new path in the INSTALLDIR.

This code is present in the Installing event of each feature used for changing the installation path.

szInstallDir = INSTALLDIR;
//Function used to get the Installation path
GetInstallationPath( szInstallDir );
INSTALLDIR = szInstallDir;
Enable(STATUSEX);

Required help immediately.

Ramesh.

RobertDickau
07-09-2004, 09:44 AM
Instead of using INSTALLDIR for each component and trying to change it in the middle of file transfer, perhaps use four different Directory identifiers, and change each one separately?