|The "Msi" Command|
This command is used to create or open an MSI, you can not use most other commands before this one as the MSI is unavailable for modification! This command is can currently only be used once per script.
This command takes these parameters:
You may wish to read template ".IDT" files to populate standard tables.
I prefer not to have my template in binary form but user other methods to obtain the same result. As an example text base ".IDT" files can be revision controlled, examined in Notepad (text editor) and compared using common difference programs. The ".IDT" programs can be imported with the TableImportFromIdt command.
It would be a good idea to place to define or create any "complete" feature your MSI might use (use the "Feature" command) as soon as possible after this command.
|EXAMPLE - Create a EMPTY Database|
This is an example of how you would create a completely empty database:
<$MSI "..\MSI\fred.msi" Create="Y">
|EXAMPLE - Use existing Database as TEMPLATE|
This is an example of how you could use an existing database as a templae:
<$MSI "out\fred.msi" Template="S:\MSI Templates\UISample.msi">
|EXAMPLE - Open for Update|
This is an example of how an existing MSI could be opened for update. This may be a template you copied over from elsewhere (however there are easier ways of doing this):
|EXAMPLE - Open Read Only|
This example simply exports all tables in the database (this is the WHOLE script):
;--- Include the correct support (MAKEMSI.MMH/DEPT.MMH for MSI Creation) ---- #include "OpenMsi.MMH" ;--- Do the work ------------------------------------------------------------ <$Msi "UISAMPLE.msi" ReadOnly="Y"> <$TableExportToIdt> ;;All "normal" tables <$TableExportToIdt TABLE="_SummaryInformation"> ;;Output summary information <$TableExportToIdt TABLE="_ForceCodepage"> ;;Output database code page information <$/Msi>
With little more work the filename could be passed from a batch file to make it a command line MSI table dumper (and binary extractor).