In the Windows SDK there are a bunch of scripts such as WiRunSQL.vbs that
modify MSI files. These use the scripting interfaces which in general if you
put "Msi" in front of them you'll have the Win32 API. So OpenDatabase is
MsiOpenDatabase, OpenView is MsiOpenView, the APIs that get records are
MsiRecordGetxxxxx and so on.
Use P/Invoke to the Win32 APIs. That works better that adding a reference to
msi.dll to get an interop assembly. That's abusing the late-binding
scripting interface by assuming that the resulting interop assembly will
work with all versions of MSI. The definition of an IDispatch scripting
interface is that you should get the method descriptions at run time, and
you can't know that your interop assembly will match whatever msi.dll
happens to be on the system.
--
Phil Wilson
The Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972
Post by deepansh guptaHello
I am working on a C# project to modify msi programmatically.
I have no idea from where to start.
Can somebody please point me to appropriate resources?
thanks
Deepansh Gupta