Tips: MSI: Save differences between two msi as MST file using ruby & python


require ‘win32ole’
msiClass =“WindowsInstaller.Installer”)
msidb = msiClass.OpenDatabase(“C:\\temp\\MountPointGenerator.msi”,0)
newmsidb = msiClass.OpenDatabase(“C:\\temp\\updatedMountPointGenerator.msi”,0)
transform = newmsidb.GenerateTransform(msidb,”c:\\temp\\newtest.mst”)


import win32com.client
import os
import sys


installer = win32com.client.Dispatch(“WindowsInstaller.Installer”)
database = installer.OpenDatabase(msidb, msiOpenDatabaseModeReadOnly)
updatedDB= installer.OpenDatabase(msiupdb , msiOpenDatabaseModeReadOnly)
updatedDB.GenerateTransform(database, mstdb)

One thought on “Tips: MSI: Save differences between two msi as MST file using ruby & python

  1. Hello, perhaps you can help me… I’m trying to port a VBS script to Python 2.6.1, using “WindowsInstaller.Installer” like your msiClass; msiClass.Products returns a list of product codes that I can iterate, but I can’t seem to be able to call msiClass.Patches(myProductCode). “msiClass.Patches” succeeds and returns a “<bound method CDispatch.Patches of >” but when I call it or try “msiClass.Patches(myProductCode)” I get “pywintypes.com_error: (-2147352573, ‘Member not found.’, None, None)”. All attempts at variants of msiClass.Patches(myProductCode) failed miserably. Any hint ? Thanks…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s