How to replace dll fine in MSI file

Posted on 2011-04-28
Last Modified: 2012-05-11
Dear All,

I have one MSI packege and I want to replace one DLL file inside the MSI packege .
How I can do that.
Question by:gukhan
    LVL 40

    Expert Comment

    by:Vadim Rapp
    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.
    LVL 3

    Accepted Solution

    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.

    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
    LVL 40

    Assisted Solution

    by:Vadim Rapp
    > 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 ( 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

    Author Closing Comment

    i could not get solution
    LVL 40

    Expert Comment

    by:Vadim Rapp
    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.
    LVL 3

    Expert Comment

    have you checked both suggestions?

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    One of the frequent problems with the installations is when some file or registry entry is not removed from the system upon un-installation of the product. Clean removal is always highly desirable. One major reason for that is badly authored inst…
    I'd like to talk about something that is near and dear to my heart: build systems. Without them, building software is all about compiling locally, with software versions everywhere. It can be a mess. Today we are going to discuss building a small di…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
    This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now