Patch.SourceListAddMediaDisk 方法

SourceListAddMediaDisk 方法可将磁盘添加到已注册的磁盘集。 接受 Diskid、VolumeLabel 和 DiskPrompt 作为参数。 此方法在 MsiSourceListAddMediaDisk 上调用。

语法

Patch.SourceListAddMediaDisk(
  Diskid,
  VolumeLabel,
  DiskPrompt
)

参数

Diskid

此参数提供要添加或更新的磁盘的 ID。

VolumeLabel

此参数提供要添加或更新的磁盘的标签。 更新将覆盖注册表中的现有卷标签。 若要仅更改磁盘提示,请获取现有的已注册卷标签,并将其与新的磁盘提示一起提供。 NULL 或空字符串将空字符串(长度为 0 个字节)注册为卷标。

DiskPrompt

此参数提供要添加或更新磁盘的磁盘提示。 更新会覆盖注册表中的现有磁盘提示。 若要仅更改卷标签,请从注册表获取现有磁盘提示,并为其提供新的卷标签。 NULL 或空字符串将空字符串(长度为 0 个字节)注册为磁盘提示。

返回值

此方法不返回值。

要求

要求
版本
Windows Server 2012、Windows 8、Windows Server 2008 R2 或 Windows 7 上的 Windows Installer 5.0。 Windows Server 2008 或 Windows Vista 上的 Windows Installer 4.0 或 Windows Installer 4.5。 Windows Server 2003、Windows XP 和 Windows 2000 上的 Windows Installer 3.0 或更高版本
DLL
Msi.dll
IID
IID_IPatch 定义为 000C10A1-0000-0000-C000-000000000046

另请参阅

Patch

MsiSourceListAddMediaDisk

在 Windows Installer 2.0 及更早版本中不受支持