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

Adding Summary Information to Customization Transform

· 52CE 我爱测

To apply the customization transform during an installation of the product, you must add a Summary Information Stream to the transform file MNPtrans.mst generated in Generating a Customization Transform.

To apply the customization transform during an installation of the product, you must add a Summary Information Stream to the transform file MNPtrans.mst generated in Generating a Customization Transform.

You may generate summary information for a transform using MsiCreateTransformSummaryInfo or the CreateTransformSummaryInfo Method. The following snippet, Sum.vbs, illustrates the CreateTransformSummaryInfo Method and is for use with Windows Script Host. Note that this example performs no validation and suppresses no error conditions.

'Sum.vbs. Argument(0) is the original database. Argument(1) is the
'    customized database. Argument(2) is the transform file.
 
Option Explicit

' Check arguments
If WScript.Arguments.Count < 2 Then
    WScript.Echo "Usage is sum.vbs [original database] [customized database] [transform]"
    WScript.Quit(1)
End If

' Connect to Windows Installer object
On Error Resume Next
Dim installer : Set installer = Nothing
Set installer = Wscript.CreateObject("WindowsInstaller.Installer") 
 
' Open databases and transform 
Dim database1 : Set database1 =
    installer.OpenDatabase(Wscript.Arguments(0), 0) 
Dim database2 : Set database2 =
    installer.OpenDatabase(Wscript.Arguments(1), 0) 
Dim transform : transform = Wscript.Arguments(2)
 
' Create and add Summary Information
Dim transinfo : transinfo =
    Database2.CreateTransformSummaryInfo(Database1, transform,0,0)

To create and add summary information to the transform file MNPtrans.mst you created in Generating a Customization Transform, change directories to the folder containing Gen.vbs, the original database, the updated database, and the transform, and enter the following command line.

Cscript.exe Sum.vbs MNP2000.msi MNP2000t.msi MNPtrans.mst

Click the MNP2000.msi icon to launch an install or use the following command line.

msiexec /i MNP2000.msi

This installs the product without the customizations. To install with the customization, enter the following command line. Note that the value of the TRANSFORMS Property refers to transform file located at the source.

msiexec /i MNP2000.msi TRANSFORMS=MNPtrans.mst

The Gate feature does not appear in the feature selection tree and the components of the Gate feature are not installed even if a Complete type of installation is selected in the user interface.

Continue

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)

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

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