Question

What's the difference between these two?

MsiInstallProduct and Installer.InstallProduct. From what I've read, the only difference is that the first returns an int that will dictate if the installation succeeded or not.

I am currently using DTF (WiX) to call Installer.InstallProduct. The problem is, this function has a return type of void.

Question: How can I determine if the installation succeeded or not when calling Installer.InstallProduct via DTF?

Was it helpful?

Solution

As you noticed, MsiInstallProduct simply returns error or success with no further information. Installer.InstallProduct returns nothing. DTF returns nothing.

Why the difference? MsiInstallProduct is old school C/C++ where you return error codes. The others are new school where instead you raise exceptions. Your code then catches the exception to know that there was a problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top