Export Files

The VBScript file WiExport.vbs is provided in the Windows SDK Components for Windows Installer Developers. This sample shows how to write script to export tables into a Windows Installer database. The script sample connects to an Installer object, opens a database and exports tables to archive files.

The sample demonstrates the use of:

You'll require the CScript.exe or WScript.exe version of Windows Script Host to use this sample. To use CScript.exe to run this sample, type a command line at the command prompt using the following syntax. Help is displayed if the first argument is /? or if too few arguments are specified. To redirect the output to a file, end the command line with VBS > [path to file]. The sample returns a value of 0 for success, 1 if help is invoked, and 2 if the script fails.

cscript WiExport.vbs [path to database][path to folder][options][table name list]

Specify the path to the installer database from which the tables are being exported. Specify the path to the folder into which the exported archive files are to be copied. List the case-sensitive names of the database tables being exported. Specify '*' to export all the tables including _SummaryInformation.

The following options may be specified anywhere on the command line before the table name list.

Option Description
no option specified Exported archive files may have a long file name.
/s Force exported archive files to have short file names.


For additional scripting examples, see Windows Installer Scripting Examples. For sample utilities that do not require Windows Script Host, see Windows Installer Development Tools.