[英]Reading the Directory table of an MSI with a custom action
I have a managed code custom action which uses the following code to read a custom table. 我有一个托管代码自定义操作,该操作使用以下代码读取自定义表。
var Configfolder = session.Database.OpenView(session.Database.Tables["ProtectedConfigFolders"].SqlSelectString);
This works how ever when I try and read the directory table in the same way 当我尝试以相同方式读取目录表时,此方法有效
var dirview = session.Database.OpenView(session.Database.Tables["Directory"].SqlSelectString);
I get 我懂了
exception of type 'Microsoft.Deployment.WindowsInstaller.BadQuerySyntaxException' occurred in Microsoft.Deployment.WindowsInstaller.dll.
Microsoft.Deployment.WindowsInstaller.dll中发生了类型'Microsoft.Deployment.WindowsInstaller.BadQuerySyntaxException'的异常。
如果您的自定义操作是在CostFinalize之后执行的,则只需将它们视为MSI属性即可引用目录表值(即,以与在自定义操作中获取“ ProductVersion”或“ ProductName”相同的方式获取目录)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.