View Full Version : How to install files to different drives (Basic MSI)?

06-28-2007, 04:56 PM
If customers want to install some files on the different drive, such as e:, some files are still on [SystemFolder], such as c: where Windows is installed, How can I change the [InstallDir] to e:? while other files still install to c:.

If I change "TARGETDIR" to e: in directory table with InstallChangeFolder dialog, all folder names in directory table with TAGGETDIR as parent will change to e:.

How do I handle this in one installer?


06-29-2007, 12:24 AM

use different components. and set the destination to wherever you want.

will this cater your need?


06-29-2007, 08:19 AM
Hi Praveen,
Thanks for your input.
I know I can set any destination for the component. But it's the end user who decide to install some important files to the different drive.
If I use a customized dialog to list available drives in user's computer, how do I change only the drive name in [INSTALLDIR] after user choose the drive?


07-04-2007, 08:06 AM
set the "ROOTDRIVE" property to the desired letter.

07-04-2007, 10:31 AM
This is how I would do it using msi:

Create 2 Directories, for example INSTALLDIR and SAMPLESDIR. Have components that are to be installed under INSTALLDIR reference that directory or one of its sub directories and components that are to be installed under SAMPLESDIR reference that directory or one of its sub directories.

Create a dialog similar to the DestinationFolder one that lets the user set both the INSTALLDIR and SAMPLESDIR directories. A similar result could be achieved using a CustomSetup style dialog and multiple features.