\
Source Code
Commands
DirectoryCompress
The "DirectoryCompress" Command |
This command makes use of the "compact.exe" command
(available in WINNT, WIN2000 and WINXP) to compress folders.
This command compresses folders, compressing all files and subfolders.
There is no uncompression at uninstall.
Errors at compression time are ignored.
Its assumed that this is a non-critical operatation.
If you'd like error handling let me know with the reason and I'll add it.
The macro takes these parameters:
- File Extension (positional)
This is a list of one or more directory names.
If more than one is supplied then you should separate
them with a semi-colon (";").
- Condition (optional)
You may not always wish to compress a directory or perhaps a
directory is not always installed.
This parameter allows you to specify a condition which if
true causes the compression script to be executed.
;--- Create some directories ------------------------------------------------
<$DirectoryTree Key="LOGDIR" Dir="[INSTALLDIR]\LOGS" CHANGE="\" MAKE="Y">
<$DirectoryTree Key="DIR1" Dir="[INSTALLDIR]\DIR1" CHANGE="\" MAKE="Y">
<$DirectoryTree Key="DIR2" Dir="[INSTALLDIR]\DIR2" CHANGE="\" MAKE="Y">
<$DirectoryTree Key="DIR3" Dir="[INSTALLDIR]\DIR3" CHANGE="\" MAKE="Y">
<$DirectoryTree Key="LOGDIRXX" Dir="[INSTALLDIR]\LOGS\XX" CHANGE="\" MAKE="Y">
;--- Press some of them -----------------------------------------------------
<$DirectoryCompress "[LOGDIR];[DIR1]">
<$DirectoryCompress "[DIR3];c:\tmp" condition="VersionNT">