MSI Factory 2.3

Folders

Folders

Previous topic Next topic  

Folders

Previous topic Next topic  

MSI Factory

The Folders dialog allows you to define the destination folder structure for your installer. You can add, edit, and remove subfolders beneath the common system folders supported by Windows Installer.

The folders on this dialog represent <Directory> elements in WiX, and Directory table entries in Windows Installer.

By default, only some of the system folders supported by Windows Installer are listed, but you can add more at any time by clicking the Other Folders button. All of the destination folders exist below a single root destination directory which is usually referred to by its ID (TARGETDIR).

If you arrived at the Folders dialog by clicking a Browse button on another dialog (such as File Properties), clicking OK will select a destination folder for that item. Note that folders are actually referenced by their folder ID, which must be unique for each folder.

Note: Adding a folder on this dialog will not necessarily create a folder on the user's system. In order to create an empty folder, you will need to define a Create Folder operation. However, the folders you define here *will* automatically be created during installation if any items that reference them (files, shortcuts, etc.) are installed.

Tip: You can use the Show folder IDs checkbox to see which ID is currently set for each folder in the tree.

Common Tasks

Adding Other System Folders

To add additional Windows Installer system folders immediately beneath TARGETDIR, click the Other Folders button. This will open the System Folders dialog.

Adding a New Folder

To add a new subfolder, click on a folder in the tree, and click the Add button. This will open the Folder Properties dialog. Note that the new folder will be added inside the one you select in the tree, so you should click on the folder that you want the new folder to be a child of.

Editing an Existing Folder

You can edit a folder's properties by doing any of the following:

- Select a folder and click the Edit button.

- Double-click on a folder.

- Right-click on a folder and select Edit from the context menu.

- Select a folder and press the space bar.

Note that you cannot edit the pre-defined Windows Installer system folders. Those folders are special and cannot be modified (although you can add them using the Other Folders button and remove them using the Remove button if you wish).

If you rename an existing folder ID, MSI Factory will automatically update instances of that ID in the following locations: (all other instances need to be manually updated)

- Custom Actions > Run Executable > Working folder

- Custom Actions > Set Folder > Folder ID

- Feature Properties > Target folder to browse for

- File Properties > General > Destination Folder

- File Properties > Shortcuts > Start in folder

- TypeLib Properties > Help folder

- Merge Module Properties > Parent folder

- Reserve Cost Properties > Folder

- File Operations > Copy Files > Source Folder

- File Operations > Copy Files > Destination Folder

- File Operations > Remove Files > Folder

- File Operations > Create Folder > Folder

- File Operations > Remove Folder > Folder

- INI Files > Set INI Value > Folder

- INI Files > Remove INI Value > Folder

- Shortcuts > Create Shortcut > Location

- Shortcuts > Create Shortcut > Start in folder

Removing a Folder

To remove a folder from your project:

- Select the folder and click the Remove button.

- Select the folder and press the Delete key.

- Right-click on the folder and choose Remove from the context menu.

Removing a folder will remove it from your project, but will not update any project items (files, components, etc.) that reference that folder ID. Removing folders that are currently being used in your project may result in build errors and prevent you from building the project. In that case you will either need to replace the missing folders, or remove the items (files, etc.) that were referencing those folder IDs.

Changing the Hierarchy of Existing Folders

You can change the hierarchy of folders by:

- Selecting the folder that you want to move and then using the arrow buttons to move it.

- Right clicking on the folder that you want to move and then choosing the appropriate option from the context menu.

- Dragging a folder and dropping it onto another folder.

- Holding the Ctrl key while pressing a cursor key (up, down, left, right) to move the selected folder in that direction.

When you move a folder, all of the subfolders beneath it move as well.

Note that you cannot move the root-level system folders.

More Information

MSDN Online: Directory Table

WiX Help File: Directory Element


Learn More: Indigo Rose Software - MSI Factory - Buy Now - Contact Us