通过 msi 有条件地安装文件(内部错误 2732)
我想将插件 dll 安装到预安装的应用程序中。预安装的应用程序在注册表中具有其安装位置,我可以从中获取其位置。如果我找不到注册表。我只是不想安装插件文件。我正在使用 Wise Installation Express 7.4.0.214。
我所做的就是在注册表中进行系统搜索,然后获取我想要为其发送插件的程序的安装位置,
我在目录表中创建了一个名为“PluginDir”的条目,其中 Directory_parent 设置为“”并且 DefaultDir到 ”。”
在 MSI 脚本中,我在“立即执行”选项卡上编写了脚本。
REM Display the message fetched from the registry
Display Message [InstalledDir]
Set Directory PluginDir to [InstalledDir]Plugin\
消息框显示正确的获取路径,但一旦它指向“设置目录”,它就会显示“内部错误 2732.0”,
但是当我评论设置目录时,Msi 运行时没有错误。我不明白我做错了什么。
I want to install a plugins dll to a pre-installed application. Pre-installed application has its installed location in registry from where I can get its location. If I cannot found the registry. I simply don't want to install the plugin file. I am using Wise Installation express 7.4.0.214.
What I have done is put a System search on the registry and I get the installed location of program for which I want to ship the plugin
I have created a entry in Directory table by name "PluginDir" whoes Directory_parent is set to "" and DefaultDir to "."
In MSI script I have wriiten the script on Execute Immediate tab
REM Display the message fetched from the registry
Display Message [InstalledDir]
Set Directory PluginDir to [InstalledDir]Plugin\
The message box show the correct fetched path but as soon as it cone to Set directory it shows “Internal Error 2732. 0”
But when I comment set directory Msi run withot error. I am not getting what I am doing wrong.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
恐怕我不太了解(顺便说一句,这是一个报废产品),但在 MSI 中,您对组件设置了一个条件。 AppSearch 将读取注册表以尝试设置该属性,并且您可以在分配目录和控制是否安装组件及其文件时使用该属性。
I'm afraid I don't know wise very well ( it's an end of life product btw ) but in MSI you put a condition on your component. AppSearch will read the registry to try to set the property and you use the property in both assigning your directory and gating whether the component and it's file gets installed.
您设置的目录调用顺序不正确。
您应该在 CostInitialize 之后对其进行排序。
查看文档 http://msdn.microsoft .com/en-us/library/aa372835(VS.85).aspx。
Your set directory call is sequenced incorrectly.
You should sequence it after CostInitialize.
Take a look at the doc http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx.
找到了解决方案
我从http://www.dawnstar.com.au/wpshelp/ tnt/conditional_changes.html
I found the solution from
http://www.dawnstar.com.au/wpshelp/tnt/conditional_changes.html