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]: MM Batch Files[Next]: Can MAKEMSI be used without installing it on the machine?
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Building or Updating MSIs->Unattended MSI Builds

Unattended MSI Builds

As the "MM.CMD" batch file can be executed without requiring user interaction (and it returns a meaningful return code - zero means OK) it can be invoked to build or update MSIs. Remember however that it is a batch file and not an executable so you may have to execute it via the Windows command processor (for example "CMD.EXE /C MM.CMD SomeScript.MM").

At the end of the day the "MM.CMD" batch file simply invokes a PPWIZARD command line, you could execute this directly which may give you more control over the command line options. The batch file logs the command line it invokes in a "*.dbg.txt" file so examination of this file will provide you a sample command line (it starts with "reg4mm.exe PPWIZ4MM.4MM"). See the installed PPWIZARD documentation for more detail on the command line.

If you wish to include build numbering into the build then you should have a look at the "MSI Build Numbers" section.

You may wish to create a batch file, this may be simple or complex, either way the "Batch File Tips and Tricks" section should help.

\\Network Drives (UNC Names)

Windows doesn't fully support UNC paths which is why the explorer build options display an error message if you try to build an MSI from a UNC directory.

The easiest solution from a command line is to use the "PUSHD" and "POPD" commands. The "PUSHD" command makes the specified directory the "current" directory while allocating drive letters for any "UNC" paths.

DATA IMPORT

You may need to import data from external resources (perhaps SQL databases or environment variables), as MAKEMSI source is text you could programatically build these files before invoking the build.

An alternative is to make your script more intelligent and do whatever setup is required. PPWIZARD allows you to access any external data you have so version numbers etc could for example come from an SQL database. It is also worth remembering that the version files keywords or sections can be setup in your script and in fact a version file is not required if you set everything up appropriately.

Related Sections


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]: MM Batch Files[Next]: Can MAKEMSI be used without installing it on the machine?


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Saturday May 28 2022 at 3:11pm
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.