The "MapUserDir" Command |
This is a configuration command which you might use in a common header for all of your MSI files. It is used to set up mappings of user type directory names to something else, for example you can ensure that if you use "c:\program files" that this should be converted to "[ProgramFilesFolder]" instead.
The define "DIRMAP_STANDARD_MAPPINGS" defines some translations, you can replace or add to these if you wish.
This command takes these parameters:
Note that normally you are trying to map directories and so would terminate the "to" and "from" filenames with a slash, however you could map directories or partial directory names (for example "C:" to "D:").
The mappings are performed in order of definition and all are always applied.
Note that the directory names can be supplied in any case and only the start of a directory name is examined/modified.
EXAMPLE |
This is the actual code used to configure MAKEMSI by default:
#( '' #define? DIRMAP_STANDARD_MAPPINGS ;--- Standard mappings --------------------------------------------------- <$MapUserDir "C:\Program Files\" "[ProgramFilesFolder]\"> <$MapUserDir "C:\Windows\" "[WindowsFolder]\"> <$MapUserDir "C:\WinNT\" "[WindowsFolder]\"> <$MapUserDir "C:\Windows\System32\" "[SystemFolder]\"> <$MapUserDir "C:\WinNT\System32\" "[SystemFolder]\"> #)