How do I check the version of an MSI/Setup.exe against what is installed on a machine using C#?
Posted on 2008-10-23
I have an MSI package that installs various .dlls on a local machine. This MSI/Setup.exe sits on the server. I want to run an exe (built in C#) that opens up and checks the version of the MSI/Setup.exe on the server and makes sure the latest version is installed on the local machine.
For example, the version number of my installer program is 1.0.2, once installed I can see this version number in the registry. However if I check the version of the setup.exe using..
FileVersionInfo v = FileVersionInfo.GetVersionInfo(InstallFile);
I get version 8.0.50727.42!
Any idea how I can see if the setup.exe is newer then the installed version on the local machine?
Thanks a lot.