大网数据广告活动
安装更新与部署

Windows Installer Scripting Examples

· 52CE 我爱测

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 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.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。