Share via


Installer.ComponentPath 屬性

ComponentPath屬性是唯讀屬性,可傳回已安裝元件的完整路徑。 如果元件的機碼路徑是登錄機碼,則會傳回登錄機碼。

這個屬性是唯讀的。

Syntax

propVal = Installer.ComponentPath

屬性值

備註

如果元件是登錄機碼,則登錄根目錄會以數值表示。 例如,「HKEY_CURRENT_USER\SOFTWARE\Microsoft」 的登錄路徑會傳回為 「01:\SOFTWARE\Microsoft」。 傳回的登錄根目錄的定義如下:

Root 傳回值
HKEY_CLASSES_ROOT 00
HKEY_CURRENT_USER 01
HKEY_LOCAL_MACHINE 02
HKEY_USERS 03
HKEY_PERFORMANCE_DATA 04

 

規格需求

需求
版本
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 Installer
DLL
Msi.dll
IID
IID_IInstaller定義為 000C1090-0000-0000-C000-000000000046

另請參閱

MsiGetComponentPath