In our environment, I have a preinstall.au3 (AutoIt3 script) which examines the MSI file and also the installed products. This is not something I distribute to customers but handy in our internal environment, where there is a repetitive uninstall/install old/new build at least once per day.
This is easy to do following the guidance that Microsoft gives on using the Windows Installer as an Automation object. You can pick out the ProductVersion and much more.
AutoIt is an excellent, easy to use, scripting tool and you can compile the script into an EXE. This makes it possible to do everything you may be doing now with an inline vbscript. I avoid vbscript because it is considered a security hazard by many and sometimes system admins disable it on machines they control.
Just search for Windows Installer Automation at the MSDN website. You can get AutoIt3 at
http://www.autoitscript.com
FOLLOW US
Get the latest news in Application Packaging