Windows Installer Scripting Examples
The Windows SDK Components for Windows Installer Developers contains VBScript files that show you how the Windows Installer automation interface is used to modify Windows Installer packages.
The script samples identified in this topic are not supported by Microsoft Corporation, and they are provided only as a potentially useful reference. Running these samples requires the Windows Script Host. For more information about Windows Script Host, see the Windows Script Host section of the Microsoft Windows Software Development Kit (SDK).
Sample Script File | Description |
---|---|
WiLstPrd.vbs | List Products, Properties, Features, and Components |
WiImport.vbs | Import Files |
WiExport.vbs | Export Files |
WiSubStg.vbs | Manage Substorages |
WiStream.vbs | Manage Binary Streams |
WiMerge.vbs | Merge Two Databases |
WiGenXfm.vbs | Generate a Transform |
WiUseXfm.vbs | Apply a Transform |
WiLstXfm.vbs | View a Transform (CSCRIPT only) |
WiDiffDb.vbs | View Differences Between Two Databases (CSCRIPT only) |
WiLstScr.vbs | View Installer Script (CSCRIPT only) |
WiSumInf.vbs | Manage Summary Information |
WiPolicy.vbs | Manage Policy Settings |
WiLangId.vbs | Manage Language and Codepage |
WiToAnsi.vbs | Copy a Unicode File to an Ansi File |
WiFilVer.vbs | Manage File Sizes and Versions |
WiMakCab.vbs | Generate File Cabinet |
WiRunSQL.vbs | Execute SQL Statements |
WiTextIn.vbs | Copy ANSI File Into a Database Field |
WiCompon.vbs | List Components |
WiFeatur.vbs | List Features |
WiDialog.vbs | Preview User Interface |
All these scripts display a help screen that describes their command line arguments. To display the help screen in Windows double-click the file. To display the help screen from a command line enter a ? as the first argument, or enter fewer arguments than required. Scripts return a value of 0 for success, 1 if help is invoked, and 2 if in case of failure.
These samples require Windows Script Host to run. Windows Script Host is actually two hosts:
- CScript.exe is the version that enables you to run scripts from the command prompt, and provides command-line switches for setting script properties.
- WScript.exe is the version of Windows Script Host that enables you to run scripts from Windows. For more information, see the Windows Script Host section in the Windows SDK.
The Makecab.exe utility is included with the patching samples in the Windows SDK Components for Windows Installer Developers.
For information about WMI, see Using Windows Installer with WMI.