如何使用 VBScript 更改 *.msi 中包含的文件的内容
给定一个使用 VS2010 安装项目生成的安装程序,我想将 .NET DLL 替换为另一个,而不更改名称。
我已经根据 此问题,交换“二进制”表中条目的内容。
我已经使用 Orca 找到了有问题的文件。它存在于唯一的内阁文件中。我已在“媒体”表中找到此内阁文件。我不确定如何更改此压缩文件 (API),并且我怀疑我也必须更改 MSI 数据库中的一些信息(“MsiAssemblyName”表中程序集的“ProcessorArchitecture”记录)。
理由:我正在为 Autodesk Revit 2011 插件制作安装程序。这些是使用程序集 RevitAddinUtility.dll
注册的,该程序集必须与安装程序捆绑在一起。该程序集有两种版本,一种用于 32 位安装,一种用于 64 位安装。我需要在创建安装程序时换入正确的版本,以避免编写多个安装程序。
Given an installer generated with a VS2010 Setup Project, I would like to swap out a .NET DLL with another one without changing the name.
I am already altering the msi
file according to this question, swapping out the contents of an entry in the "Binary" table.
I have located the file in question using Orca. It resides in the only cabinet file. I have located this cabinet file in the "Media" table. I'm not sure how to change this cabinet file (API) and I suspect I'd have to change some information in the MSI database too (the "ProcessorArchitecture" record for the assembly in the "MsiAssemblyName" table).
Rationale: I'm making an installer for a Autodesk Revit 2011 plugin. These are registered using an assembly RevitAddinUtility.dll
which must be bundled with the installer. This assembly comes in two flavors, one for 32-bit and one for 64-bit installations. I need to swap in the correct version when creating the installer, to avoid writing more than one installers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是我同时使用的一种解决方法:
RevitAddinUtility.dll
,另一个名为RevitAddinUtility64.dll
如果是,则更改文件名:
Here is a workaround I'm using in the meantime:
RevitAddinUtility.dll
the otherRevitAddinUtility64.dll
if yes, then change the names of the files: