Product.SourceListInfo 屬性

Product物件的SourceListInfo屬性會取得並設定產品的來源資訊屬性。 此屬性會呼叫 MsiSourceListGetInfoMsiSourceListSetInfo。 這是讀取或寫入屬性。

這個屬性是唯讀的。

Syntax

propVal = Product.SourceListInfo

屬性值

要查詢或設定之產品的來源資訊屬性名稱。 如需可能的值,請參閱本主題的一節。

備註

並非所有可以擷取的屬性都可以設定。 szProperty參數可以是下列其中一個值。

屬性 可以設定嗎? 意義
MediaPackagePath Y 相對於安裝媒體根目錄的路徑。
DiskPrompt Y 提示使用者輸入安裝媒體時所使用的提示範本。
LastUsedSource Y 產品最近使用的來源位置。 當您設定此屬性時,請在來源位置前面加上 「n;」 作為網路來源的前置詞,或為 URL 類型加上 「u;」。 例如,「n;\\scratch\scratch\scratch\MySource」 和 「u;; https://MyServer/MyFolder/MySource" 」。
LastUsedType N 如果上次使用的來源是網路位置,則為 「n」。 如果上次使用的來源是 URL 位置,則為 「u」。 如果上次使用的來源為媒體,則為 「m」。 如果沒有上次使用的來源,則為空字串 (「」) 。
PackageName Y 來源上 Windows Installer 套件或修補程式套件的名稱。

 

規格需求

需求
版本
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

另請參閱

產品

MsiSourceListGetInfo

MsiSourceListSetInfo

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