ROOTDRIVE is not modifying the destination directory

Article:HOWTO5856  |  Created: 2005-10-11  |  Updated: 2007-06-28  |  Article URL http://www.symantec.com/docs/HOWTO5856
Article Type
How To


Question
How do I specify the destination directory of the installation? What if ROOTDRIVE is not working?

Answer

The ROOTDRIVE property specifies the default drive for the destination directory of the installation.

The ROOTDRIVE property will not work as expected if you place files in Windows-defined folders, such as ProgramFilesFolder or ProfilesFolder. Windows Installer defines the location of Windows-defined folders during installation runtime. Please view the Windows Installer SDK article entitled "System Folder Properties" for a complete listing of folders that are not affected by the ROOTDRIVE property.

The destination directory of the installation can be manipulated by using the directory of the main program files as a property. Use a Set Directory custom action to define explicitly the destination path of a folder that is placed in a system-defined folder, such as ProgramFilesFolder. All files and sub-directories that are placed in the directory will be affected by the Set Directory custom action. Please follow the steps below to specify the location of the destination directory:

  1. Open the MSI Script and view the User Interface Sequence tab.
  2. Find the CostFinalize action in the User Interface sequence.
  3. Place a Set Directory custom action after the CostFinalize action.
  4. After selecting the Set Directory custom action from the Actions list, the Set Directory dialog will appear. Input the following fields on the Details tab on the Set Directory dialog. Example entries are shown for the fields below:
    1. Custom Action Name: Action
      * Input a unique name to reference the action.
    2. Directory: INSTALLDIR
      * Click the Browse... button to browse for the directory in your installation. After you select the directory, the internal name of the directory used by Windows Installer will be displayed in the Directory field.
    3. Directory Value: D:\MyApplication
      * Input the desired destination path of the installed folder. Do not use trailing backslashes, as Windows Installer will add the backslash.
  5. You can accept the default values for the fields on the Properties tab.
  6. Click OK on the Set Directory dialog to save the custom action.
  7. Repeat steps 1–6 or simply copy the Set Directory custom action to the Execute Immediate sequence after the CostFinalize action, so that the installation supports silent installation. The User Interface sequence is ignored during silent installation of MSIs.

The preceding seven steps detail the procedure necessary to define explicitly the destination directory. It is not recommended to set the destination directory by using ROOTDRIVE or using a Set Directory custom action, unless the destination machine is a known environment. The user's machine may vary considerably. The destination machine may not have a desired drive letter that your installation is specifying.


Legacy ID



3023


Article URL http://www.symantec.com/docs/HOWTO5856


Terms of use for this information are found in Legal Notices