SourceDir 屬性

SourceDir屬性是根目錄,其中包含安裝套件的來源封包檔案或來源檔案樹狀目錄。 此值用於目錄解析。

預設值

包含安裝套件的目錄。

備註

必須先呼叫ResolveSource 巨集指令,才能在任何運算式中使用SourceDir屬性,或嘗試使用MsiGetProperty擷取SourceDir的值。 當來源無法使用時,不應該執行 ResolveSource 巨集指令,例如卸載應用程式時,因為這可能會導致來源媒體出現非預期的提示。

規格需求

需求
版本
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。 如需 Windows Installer 版本所需的最低 Windows Service Pack 相關資訊,請參閱 Windows Installer Run-Time需求

另請參閱

屬性