簡體   English   中英

使用自定義操作讀取MSI的目錄表

[英]Reading the Directory table of an MSI with a custom action

我有一個托管代碼自定義操作,該操作使用以下代碼讀取自定義表。

var Configfolder = session.Database.OpenView(session.Database.Tables["ProtectedConfigFolders"].SqlSelectString);

當我嘗試以相同方式讀取目錄表時,此方法有效

var dirview = session.Database.OpenView(session.Database.Tables["Directory"].SqlSelectString);

我懂了

Microsoft.Deployment.WindowsInstaller.dll中發生了類型'Microsoft.Deployment.WindowsInstaller.BadQuerySyntaxException'的異常。

如果您的自定義操作是在CostFinalize之后執行的,則只需將它們視為MSI屬性即可引用目錄表值(即,以與在自定義操作中獲取“ ProductVersion”或“ ProductName”相同的方式獲取目錄)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM