The "RemoveFile" Command |
This command can be used to to populate the "RemoveFile" table.
It can be useful to overcome ICE validation errors if you create subdirectories for user shortcuts or you may wish to completely remove a directory on uninstall (including any created log files etc).
This command is takes the following parameters:
The value is assumed to be an 8.3 formatted wildcard unless you supply both short and long formats ("8.3|long format").
I can only assume "*.*" on a directory followed by "" will clear a directory which contains files. Microsoft do not document this (that is do they order their deletions to delete files before folders etc).
The default for this parameter can be set via the DEFAULT_REMFILE_INSTALLMODE macro. The default value is "UNINSTALL".
EXAMPLES |
;--- Doco ------------------------------------------------------------------- <$DirectoryTree Key="SCDIR_MAKEMSI" Dir="[ProgramMenuFolder]\MakeMSI Tool"> <$Component "DocoMAKEMSI" Create="Y" Directory_="INSTALLDIR"> <$RemoveFile DIR="SCDIR_MAKEMSI"> <$File Source="OUT\DOCO\MakeMsi.chm" Comment='MAKEMSI documentation.' KeyPath="Y"> #( <$Shortcut Dir="SCDIR_MAKEMSI" Feature="<$COMPANY_COMPLETE_FEATURE>" Title="MakeMsi|MAKEMSI Documentation" Description="Documents the MAKEMSI tool" > #) <$/Component>