Add Predefined Directories / Folders in Installshield

How do I add missing predefined directories in a Directory Table of an already compiled and built MSI?

When modifying an existing MSI, perhaps directly or via a Transform and you wish to include a Predefined Directory within your File Structure, instead of hardcoding a directory (like you shouldn’t do) and letting Windows determine the correct path for the Installer to use.

You may come across an already compiled MSI that is missing these already built-in directories, that InstallShield typically includes when creating a new MSI. As the MSI you’re facing has already been compiled, I have found through my own experience these directories may be missing, perhaps InstallShield (or whatever the original compiler was used) excluded these upon building the MSI initially due to not requiring them in your original File and Folder structure.

Before I continue, you’ll see below the list of Predefined directories that Flexera InstallShield typically within in a new project (a new MSI). You will find these within the Directory table of your MSI.

If you’re using InstallShield and have the MSI open, browse down to the bottom of your left pane and select Direct Editor (here you will find all your MSI tables). You can also view these in any application that allows you to view the MSI tables, such as InstedIt and Orca.

Directory Directory_Parent DefaultDir
TARGETDIR SourceDir
DATABASEDIR ISYourDataBaseDir .
INSTALLDIR ISMyProductDir .
ALLUSERSPROFILE TARGETDIR .:ALLUSE~1|All Users
USERPROFILE TARGETDIR .:USERPR~1|UserProfile
SystemFolder TARGETDIR .:System32
AdminToolsFolder TARGETDIR .:Admint~1|AdminTools
AppDataFolder TARGETDIR .:APPLIC~1|Application Data
CommonAppDataFolder TARGETDIR .:Common~1|CommonAppData
CommonFiles64Folder TARGETDIR .:Common64
CommonFilesFolder TARGETDIR .:Common
ISYourDataBaseDir INSTALLDIR Database
DesktopFolder TARGETDIR .:Desktop
FavoritesFolder TARGETDIR .:FAVORI~1|Favorites
FontsFolder TARGETDIR .:Fonts
GlobalAssemblyCache TARGETDIR .:Global~1|GlobalAssemblyCache
ISMyProductDir ISMyCompanyDir MYPROD~1|My Product Name
ISCommonFilesFolder CommonFilesFolder Instal~1|InstallShield
ProgramFilesFolder TARGETDIR .:PROGRA~1|program files
ISMyCompanyDir ProgramFilesFolder MYCOMP~1|My Company Name
LocalAppDataFolder TARGETDIR .:LocalA~1|LocalAppData
MyPicturesFolder TARGETDIR .:MyPict~1|MyPictures
PersonalFolder TARGETDIR .:Personal
PrimaryVolumePath TARGETDIR .:Primar~1|PrimaryVolumePath
ProgramFiles64Folder TARGETDIR .:Prog64~1|Program Files 64
ProgramMenuFolder TARGETDIR .:Programs
SendToFolder TARGETDIR .:SendTo
StartMenuFolder TARGETDIR .:STARTM~1|Start Menu
StartupFolder TARGETDIR .:StartUp
System16Folder TARGETDIR .:System
System64Folder TARGETDIR .:System64
TempFolder TARGETDIR .:Temp
TemplateFolder TARGETDIR .:ShellNew
WindowsFolder TARGETDIR .:Windows
WindowsVolume TARGETDIR .:WinRoot

Alright, so to continue. Let’s start out with a Scenario; You’re missing the WindowsVolume (C:\) within your Files and Folders structure like so.

Right Click > Show Predefined Folder > (missing folder)

Files and Folders
Files and Folders

We need to first find our Directory table within the MSI. Select Direct Editor from the left Menu and scroll down until you find your Directory Table like so.

Direct Editor
Direct Editor

Select New to open the “Add Record to Table Directory” window and complete these fields like so.

New Directory
New Directory
Add Record to Table Directory
Add Record to Table Directory

This next part is important! Save your MSI or Transform and close InstallShield or whatever application you’re using. Re-open your MSI or Transform, select Files and Folders from your left Menu again > Right Click > Show Predefined Folder > [WindowsVolume]

You should now see [WindowsVolume] as an available option to choose from like so.

Adding the Predefined Folder
Adding the Predefined Folder

Select your Predefined folder and you will now see it included in your Files and Folders structure.


A more detailed table of what each Pre-Defined folder is for.

Property Description
AdminToolsFolder Points to the folder where administrative tools are located.
AppDataFolder This property holds the full path to the current user’s Application Data folder. By default, this property is none.
CommonAppDataFolder This is the full path to the folder containing application data for all users. A common path is: C:\ProgramData
CommonFiles64Folder The value of this property is the full path to the 64-bit Common Files folder. For information on installing to 64-bit locations on target systems, see Challenges of Supporting Both 32-Bit and 64-Bit Target Operating Systems.
CommonFilesFolder The value of this property is the full path to the Common Files folder.
DATABASEDIR This property stores the destination for your installation’s database files. You can set the initial value for DATABASEDIR in the General Information view and end users can modify this value at run time in the Database Folder dialog—if you display the Change button.
DesktopFolder This property is used to hold the full path to the Desktop folder for the current user. If the setup is being run for All Users, and the ALLUSERS property is set, the DesktopFolder property should hold the full path to the All Users desktop folder.
FavoritesFolder The FavoritesFolder property contains the full path to the Favorites folder for the current user.
FontsFolder This property holds the full path to the Fonts folder.
GlobalAssemblyCache This property contains the full path to the Global Assembly Cache (GAC).
INSTALLDIR This property stores the destination folder for your installation. You can set an initial value for INSTALLDIR in the General Information view.
IISROOTFOLDER This property stores the root directory of the Web server on a target system. If you are using IIS functionality in your installation project and you have added a Web site, then IISROOTFOLDER is automatically added. Note: All of the files that you add to the IISROOTFOLDER directory in the Files view are installed to the Web server’s root directory on the target machine. If IIS is not on the target machine, the files are copied to the root folder.
LocalAppDataFolder The location of locally stored application data. A typical value of this property is: C:\Users\UserName\AppData\Local
MyPicturesFolder This property holds the full path to the current user’s My Pictures folder.
PersonalFolder This property holds the full path to the current user’s Personal folder.
PrimaryVolumePath This property is set to the path that is specified in the PRIMARYFOLDER property, which indicates the primary folder for the installation.
ProgramFiles64Folder This property holds the full path to the 64-bit Program Files folder. For information on installing to 64-bit locations on target systems, see Challenges of Supporting Both 32-Bit and 64-Bit Target Operating Systems.
ProgramFilesFolder This property holds the full path to the 32-bit Program Files folder.
ProgramMenuFolder This property is used to hold the full path to the Program menu for the current user. If the installation is being run for All Users, and the ALLUSERS property is set, the ProgramMenuFolder property should hold the full path to the All Users Programs menu.
SendToFolder This property holds the full path to the current user’s SendTo folder.
StartMenuFolder This property is used to hold the full path the Start menu folder for the current user. If the installation is being run for All Users, and the ALLUSERS property is set, the StartMenuFolder property should hold the fully qualified path to the All Users program menu.
StartupFolder This property is used to hold the full path to the Startup folder for the current user. If the setup is being run for All Users, and the ALLUSERS property is set, the StartupFolder property should hold the full path to the All Users program menu.
System16Folder This property holds the full path to the folder containing the system’s 16-bit DLLs.
System64Folder This property holds the full path to the 64-bit Windows system folder. For information on installing to 64-bit locations on target systems, see Challenges of Supporting Both 32-Bit and 64-Bit Target Operating Systems.
SystemFolder This property holds the full path to the 32-bit Windows system folder.
TempFolder This property holds the full path to the Temp folder.
TemplateFolder This property holds the full path to the current user’s Templates folder.
WindowsFolder This property holds the full path to the Windows folder.
WindowsVolume This property holds the volume of the Windows folder. It is set to the drive where Windows is installed.

Facebook Comments

About: Dale


%d bloggers like this: