| ContactEZ.net International Bilingual Services |
How to create DDF files to output all the necessary CAB for a MSI?
It is
pretty simple and straight forward. I do not think I need need to go in details on how to create a text file with VB. But the
novice packagers can search for the FileSystemObject in Microsoft help.
Related topics: MSI Automation, MSI Tables Overview, MSI Command Line, Create MSI Tables, MSI UAC VISTA, MSI Error Table, BootStrapper VISTA, MSP VISTA, Install MSI SDK Tools V3.1.4, Create CAB File, Build MSPs
For example lets say you want to create a program.ddf with the goal to create in turn a program.cab file:
Dim TextStreamBatOut
Set TextStreamCABOut = fso.CreateTextFile("Program.ddf")
bla.. bla.. bla..
TextStreamCABOut .Close
Once you know how to create a text file, you can create all the DDF files.
For example lets use the Program.cab built using Program.ddf. The content of the program.DDF
should look like:
.Option EXPLICIT
.Set Cabinet = off
.Set Compress = off
.Set MaxDiskSize = CDROM
.Set ReservePerCabinetSize = 6144
.Set DiskDirectoryTemplate = "C:\dgschnei\Portfolio\Development\dscan_code\Installation\MSI\DSCAN\English\Disk1"
.Set CompressionType = MSZIP
.Set CompressionLevel = 7
.Set CompressionMemory = 21
.Set CabinetNameTemplate = "INSTAL~1.CAB"
.Set Cabinet=on
.Set Compress=on
"C:\dgschnei\Portfolio\Development\dscan_code\Installation\MSI\SETUP\DSCAN\English\Install\Asrt.DEP"
"F1_Asrt.DEP"
"C:\dgschnei\Portfolio\Development\dscan_code\Installation\MSI\SETUP\DSCAN\English\Install\ASRTPro.exe"
"F2_ASRTPro.exe"
"C:\dgschnei\Portfolio\Development\dscan_code\Installation\MSI\SETUP\DSCAN\English\Install\DSCAN.chm"
"F3_DSCAN.chm"
"C:\dgschnei\Portfolio\Development\dscan_code\Installation\MSI\SETUP\DSCAN\English\Install\Dscan.DEP"
"F4_Dscan.DEP"
"C:\dgschnei\Portfolio\Development\dscan_code\Installation\MSI\SETUP\DSCAN\English\Install\DSCAN.exe"
"F5_DSCAN.exe"
.....
....
...keep listing here the files you want to include in the program.cab
..
.
Once all your DDF files are created, create your batch file to output all the necessary CAB files.
Here is an example of a BuildAllCABs.bat
@echo off
ECHO Use this GeoMedia batch file to make new cab files.
ECHO DDF file names are not limited in length.
ECHO CAB file names must not be over 8 characters
ECHO Press CTRL-C to cancel.
Pause
del "C:\dgschnei\Portfolio\Development\dscan_code\Installation\MSI\DSCAN\English\Disk1\*.CAB"
"MAKECAB.EXE" /f "C:\dgschnei\Portfolio\Development\dscan_code\Installation\MSI\DSCAN\English\DDF\BIN_1.ddf"
"MAKECAB.EXE" /f "C:\dgschnei\Portfolio\Development\dscan_code\Installation\MSI\DSCAN\English\DDF\DATABASES_2.ddf"
"MAKECAB.EXE" /f "C:\dgschnei\Portfolio\Development\dscan_code\Installation\MSI\DSCAN\English\DDF\Install_0.ddf"
"MAKECAB.EXE" /f "C:\dgschnei\Portfolio\Development\dscan_code\Installation\MSI\DSCAN\English\DDF\NUCLEUS_3.ddf"
"MAKECAB.EXE" /f "C:\dgschnei\Portfolio\Development\dscan_code\Installation\MSI\DSCAN\English\DDF\SYSTEM.DDF"
....
...keep listing here the DDF files you want to use to build all the
necessary CAB files
..
.
That it is. You are now creating CAB files on the fly...
FYI, the same example the media table of the MSI in question will look like:
| DiskId | LastSequence | DiskPrompt | Cabinet | VolumeLabel | Source |
| i2 | i2 | L64 | S255 | S32 | S32 |
| Media | DiskId | 1 | DISK1 | ||
| 1 | 20 | 1 | INSTAL~1.CAB | DISK1 | |
| 2 | 21 | 1 | BIN_1.CAB | DISK1 | |
| 3 | 23 | 1 | DATABA~1.CAB | DISK1 | |
| 4 | 75 | 1 | NUCLEU~1.CAB | DISK1 | |
| 5 | 78 | 1 | SYSTEM.CAB | DISK1 |
| About Dominique Gérard Schneider since 1995 - Developing solutions that really help! | ||
| Participation on Google Participation on Yahoo! Tek-Tips Forums dgschnei |
Listed since 1996 ixquick International Services Vivísimo platform sdk dgschnei |
Cooperation on Google About Me Gifts Home Decoration |