<< Click to Display Table of Contents >> RayPack > 7.3 u6 > User Guide > Advanced Topics Customizing Predefined Folders |
Be aware: This is an advanced topic requiring advanced knowledge of Windows Installer. Make a backup of a configuration before you make any changes to any file. |
The default choice of predefined folders can be customized by editing an XML file. In order to do it, navigate to the file <INSTALLDIR>\Resources\Folders\Default.xml where <INSTALLDIR> is the folder where RayPack has been installed, for example C:\Program Files (x86)\RayPack\.
The file has an XML-based syntax:
<?xml version="1.0" encoding="utf-8" ?>
<Default>
<Folder Id="AdminToolsFolder" TargetId="TARGETDIR" DefaultDir=".:ADMINT~1|AdminTools" />
<Folder Id="AppDataFolder" TargetId="TARGETDIR" DefaultDir=".:APPLIC~1|ApplicationData" />
<Folder Id="CommonAppDataFolder" TargetId="TARGETDIR" DefaultDir=".:COMMON~1|CommonAppData" />
<Folder Id="CommonFiles64Folder" TargetId="ProgramFiles64Folder" DefaultDir=".:Common64" />
<Folder Id="CommonFilesFolder" TargetId="ProgramFilesFolder" DefaultDir=".:Common" />
<Folder Id="DesktopFolder" TargetId="TARGETDIR" DefaultDir=".:Desktop" />
<Folder Id="MyFolder" TargetId="DesktopFolder" DefaultDir="Subfolder" />
...
</Default>
Each entry contains an identifier (Id, corresponding to the Directory column in the Directory table), parent identifier (TargetId, corresponding to the Directory_Parent column in the Directory table) and the displayed name (DefaultDir, corresponding to the DefaultDir column in the Directory table).
In order to define a new custom directory that points to %ProgramFiles%\Folder1\Folder with a long name, the following entries are necessary:
<Folder Id="Folder" TargetId="ProgramFilesFolder" DefaultDir="Folder" />
<Folder Id="Folder1" TargetId="Folder" DefaultDir="FOLDERWI~1|Folder with a long name" />
Note: this structure must resolve to a valid MSI Directory structure. When customizing these fields, it is recommended to create necessary folders in a blank PackDesigner project manually, and then recreate the structure in the XML file.
More information about the Directory table and DefaultDir column can be found here:
https://msdn.microsoft.com/pl-pl/library/aa368295(v=vs.85).aspx