Product.SourceListAddMediaDisk 方法

SourceListAddMediaDisk方法會將磁片新增至已註冊的磁片集。 接受 DiskidVolumeLabelDiskPrompt 作為參數。 這個方法會在 MsiSourceListAddMediaDisk上呼叫。

語法

Product.SourceListAddMediaDisk(
  Diskid,
  VolumeLabel,
  DiskPrompt
)

參數

Diskid

此參數提供所新增或更新磁片的識別碼。

VolumeLabel

此參數提供要新增或更新之磁片的標籤。 更新會覆寫登錄中的現有磁片區標籤。 若只要變更磁片提示,請取得現有的已註冊磁片區標籤,並提供新的磁片提示。 此參數的空字串會將長度 (0 個位元組的空字串註冊為磁片區標籤) 。

DiskPrompt

此參數提供要新增或更新之磁片的磁片提示。 更新會覆寫登錄中的現有磁片提示字元。 若只要變更磁片區標籤,請從登錄取得現有的磁片提示,並提供新的磁片區標籤。 此參數的空字串會在磁片提示字元 (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_IProduct定義為 000C10A0-0000-0000-C000-000000000046

另請參閱

產品

MsiSourceListAddMediaDisk

Windows Installer 2.0 和更早版本中不支援