从MSI替换文件 [英] Replace a file from MSI

查看:173
本文介绍了从MSI替换文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算在MSI文件中替换一个DLL文件。有没有办法在不影响MSI安装的情况下完成

解决方案

InstEdit(



编辑



已经快一年了,我回来提醒自己InstEd工具的工作原理。但是,我也偶然发现了您可能还会遇到的错误,因此我想添加其他信息。



当您尝试[重建选定的CAB]时,您可能会错误,如下所示:





这有点错误。 InstEd试图告诉您,您需要在尝试从中重建CAB的位置创建的CommonFilesFolder。然后将Main.exe放在该文件夹中。它还在同一文件夹中寻找Main.ico。



所有您需要做的就是将目标.exe和.ico(或提到的任何文件)复制到CommonFilesFolder中,然后再次运行重建,它将可以正常工作。

p>

I am planning to replace a DLL file within the MSI file. Is there any way to do it without effecting the MSI installation

解决方案

InstEdit (http://www.instedit.com/) does work, but it is not an intuitive tool. You do not have to have the plus version, the basic works for this. Just completed using it. Here's the process.
1. Take old MSI and install it to get all the original targets of install.

  1. copy all install targets to working directory with your current MSI.

  2. open InstEdit and open the MSI (or just drag/drop MSI into InstEdit interface)

  3. Open the Tables tab (see image)

  4. Click the Media item and you'll see some info on the right

  5. Right-click in the right-side window and choose Rebuild Selected CABs.

If you replace the old item in the directory where all of the items for the MSI are found, then when you click Rebuild Selected CABs it will import the newer version of the item automatically and rebuild your CAB.

Errors are cryptic, but if you read them closely you can figure it out and it does work. I replaced a EXE in the MSI with a newly built version.

EDIT

It's been almost 1 year and I came back to remind myself how the InstEd tool works. However, I also stumbled upon an error that you may encounter also so I want to add the additional information.

When you attempt to [Rebuild Selected CABs] you may get an error which looks like the following:

This is somewhat of a cryptic error. InstEd is attempting to tell you that you need the CommonFilesFolder created at the location you are attempting to rebuild the CABs from. Then place the Main.exe in that folder. It is also looking for Main.ico in that same folder.

All you need to do is copy the target .exe and .ico (or any files mentioned) into the CommonFilesFolder and run the rebuild again and it will work.

这篇关于从MSI替换文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆