• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1406
  • Last Modified:

How to replace dll fine in MSI file

Dear All,

I have one MSI packege and I want to replace one DLL file inside the MSI packege .
How I can do that.
0
gukhan
Asked:
gukhan
  • 3
  • 2
2 Solutions
 
Vadim RappCommented:
Here's very similar question: how to edit msi to change variable in file

The easiest is what I suggested there in ID:35195431, with administrative installation.
0
 
cyborgrdCommented:
Is not easy to replace a file with free tools like Orca. (Recreating the CAB etc). Administrative installation works but some MSI's have file hashes in the table, if you replace a file you will get a installation error because the hash don't fits to the file.

Download Wise Package Studio trial because the WPS have an easy UI.

http://www.symantec.com/business/products/trialware.jsp?pcid=pcat_infrastruct_op&pvid=wp_studio_1

Open the MSI with Windows Installer Editor, replace you file , and save as TRANSFORM! A external cab file will be created automaticlly. then you can install the original MSI  with your TRANSFORM by using commandline

msiexec /i yourmsi.msi TRANSFORMS=yourtransform.mst
0
 
Vadim RappCommented:
> some MSI's have file hashes in the table, if you replace a file you will get a installation error because the hash don't fits to the file.

Installer is using hash only to avoid unnecessary file copying during the installation, i.e. it skips the file if there's existing file with the same hash (http://msdn.microsoft.com/en-us/library/aa370532%28v=vs.85%29.aspx). If real file has different hash than what's stored in the table, there will be no error. The only possible drawback is that if the destination already has the same unversioned file as the one that was replaced, and for which hash information was stored, plus the same date, then it won't be replaced with the substituted file:

MSI (s) (F4:08) [06:54:56:609]: File: C:\Program Files\test\a.vbs;      Won't Overwrite;      Won't patch;      Existing file is unversioned and unmodified - hash matches source file
0
Increase Security & Decrease Risk with NSPM Tools

Analyst firm, Enterprise Management Associates (EMA) reveals significant benefits to enterprises when using Network Security Policy Management (NSPM) solutions, while organizations without, experienced issues including non standard security policies and failed cloud migrations

 
gukhanAuthor Commented:
i could not get solution
0
 
Vadim RappCommented:
gukhan, we gave you information that we thought was sufficient. If anything was unclear, you were, and still are, welcome to ask for any clarification.
0
 
cyborgrdCommented:
have you checked both suggestions?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Managing Security Policy in a Changing Environment

The enterprise network environment is evolving rapidly as companies extend their physical data centers to embrace cloud computing and software-defined networking. This new reality means that the challenge of managing the security policy is much more dynamic and complex.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now