MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: Directory[Next]: DirectoryTree
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->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:

EXAMPLE

;--- 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">


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Directory[Next]: DirectoryTree


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday August 13 2017 at 2:39pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.