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 FileDescription
WiLstPrd.vbsList Products, Properties, Features, and Components
WiImport.vbsImport Files
WiExport.vbsExport Files
WiSubStg.vbsManage Substorages
WiStream.vbsManage Binary Streams
WiMerge.vbsMerge Two Databases
WiGenXfm.vbsGenerate a Transform
WiUseXfm.vbsApply a Transform
WiLstXfm.vbsView a Transform (CSCRIPT only)
WiDiffDb.vbsView Differences Between Two Databases (CSCRIPT only)
WiLstScr.vbsView Installer Script (CSCRIPT only)
WiSumInf.vbsManage Summary Information
WiPolicy.vbsManage Policy Settings
WiLangId.vbsManage Language and Codepage
WiToAnsi.vbsCopy a Unicode File to an Ansi File
WiFilVer.vbsManage File Sizes and Versions
WiMakCab.vbsGenerate File Cabinet
WiRunSQL.vbsExecute SQL Statements
WiTextIn.vbsCopy ANSI File Into a Database Field
WiCompon.vbsList Components
WiFeatur.vbsList Features
WiDialog.vbsPreview 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.

Send comments about this topic to Microsoft

Build date: 11/12/2009

Tags : joefromm


Community Content

Thomas Lee
Location in the Win2k8 platform SDK
When you install the latest version of the Platform SDK, these script samples are found in the subdirectory <root of SDK install>\Samples\SysMgmt\MSI\scripts.
Tags : contentbug

Thomas Lee
Add scripts please
It would be most useful to have these scripts directly available from the MSDN Content.

To help, I've downloaded the samples and am adding them to MSDN Community content.



byren
It would be most useful to have these scripts directly available from the MSDN Content.
It would be most useful to have these scripts directly available from the MSDN Content.

To help, I've downloaded the samples and am adding them to MSDN Community content.
Tags :

Page view tracker