-3

I'm looking for any suggestions as to packages / imports that can be used to parse through two MSI files and take a differential between them (not line by line, but file by file {added file,modified file,removed file})

I've seen and looked into WiX, using Java's JdbcOdbc to parse it (doesn't work), and tried taking a proper differential using Wise Package Studio, and created a PCP file of the patch to go from version50.msi to version56.msi (couldn't figure out what to do with it).

Any ideas / suggestions are appreciated.

Dean
  • 13
  • 1

2 Answers2

0

I'm not aware of any existing tool that does this, but you could probably put something together by combining WiDiffDb.vbs and WiFilVer.vbs, both here:

https://learn.microsoft.com/en-us/windows/desktop/msi/windows-installer-scripting-examples

It might help to say exactly what you want to achieve. For example, the fact that a file is the same (or not) between two MSI files is not always useful if their component ids are different or they are installed to different locations. It appears that this comparison is a solution you're looking for, but we're here guessing at the underlying problem.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
0

Administrative Installation: As Phil says, we wonder what you really want to achieve? If you just want to figure out what files are different inside the two setups, then I would use an administrative installation for each MSI (essentially a file extraction for the MSI - shorter explanation) and then use a file / folder-comparison software to check what files are different. My favorite tool for this is Beyond Compare (no affiliation, screenshots), but any file / folder comparison tool will do.

Running an administrative installation from a cmd.exe:

Option 1, interactively: msiexec.exe /a File.msi

Option 2, silently: msiexec.exe /a File.msi TARGETDIR=C:\MyInstallPoint /qn

Dark.exe: You can also use WiX's aptly named Dark.exe to decompile an MSI - regardless of what tool was used to make it - into its constituent parts and the associated WiX markup needed to compile it again (needs some black art to clean up).

To extract contents from the MSI, you can try this command line:

dark.exe Setup.msi -x Files

Though likely flattened (without folder structure) you should be able to compare the files extracted from the setups using Beyond Compare as described above.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • My objective is to accomplish a "light install" of a program. For example, a client has a program version 1.0, I want to send him version 1.5, but due to slow wifi, it'd take him 2 hours to download this 40GB MSI file, so I'd like to create a MSI of only the difference between the two, so it would take less time to download. – Dean Jul 30 '18 at 18:27
  • Is it your own MSI? You can create a patch between the old and the new versions, but they rarely work without incident unless created by the vendor as patches. – Stein Åsmul Jul 30 '18 at 18:28
  • Yes, the software is our own. – Dean Jul 30 '18 at 20:37
  • What tool do you use to make the MSI files? Is there a dedicated team to make them in your company? – Stein Åsmul Jul 30 '18 at 20:59
  • The employee that was responsible for the creation of the MSI files left the company, I think the answer may be to properly edit the version and product ids of the MSI files, that way we can use microsoft patches to go from version A to B. – Dean Aug 03 '18 at 14:36
  • Patching requires significant MSI knowledge to do right, and most MSI files are not compliant enough with standards to be automagically converted to run as patches. For example, if `RemoveExistingProducts` is scheduled early in the `InstallExecuteSequence`, then you can not deliver a major upgrade patch. That particular problem can conceivably be handled, but there are many other technical challenges such as unversioned files, component referencing errors related to added / removed files for each component, etc... This package is 40GB? How large is this distribution? How many clients? – Stein Åsmul Aug 03 '18 at 14:58