Shintaro Takechi
Shintaro Takechi

Reputation: 1365

What are the differences between COM msi.dll WindowsInstaller and Microsoft.Deployment.WindowsInstaller?

What are the differences between COM msi.dll WindowsInstaller and Microsoft.Deployment.WindowsInstaller?

I know one exists in %WINDIR%\system32\msi.dll and the other exists in Visual Studio's reference assemblies list.

I know the implementation of the Installer objects are completely different.

Why are there two different implementation of WindowsInstaller? and why are they called the same?

Upvotes: 2

Views: 470

Answers (1)

Stein Åsmul
Stein Åsmul

Reputation: 42126

MSI API: The Windows Installer API is quite old and is implemented as Win32 C/C++ functions and a layer of COM automation on top (which you can use VBScript and many other languages to access). This is all implemented in the %WINDIR%\system32\msi.dll file (and whatever other support files are involved - I am not quite sure - there is also msiexec.exe of course - the actual installation engine and command line tool to install and configure MSI packages and msihnd.dll - and a few more I think).

DTF (Deployment Tools Foundation): As the .NET framework and managed code came of age, the use of COM and Win32 functions was kind of clunky and the Deployment Tools Foundation kit - also known as DTF was implemented to help use the MSI API with managed code. The file: Microsoft.Deployment.WindowsInstaller.dll is one of the files delivered as part of DTF and the most commonly used one. The WiX toolkit now installs DTF as part of its normal installation. Please check the links below.

Links:


Note, there are also some WMI functions.

Upvotes: 2

Related Questions