How are you uninstalling all versions of applications?
In our environment we often find ourselves challenged with application upgrades, due to a W-I-D-E variety of previous versions that we need to upgrade. Generally speaking, I'll handle uninstalls before the installs with something like this:
wmic product where "name like 'iTunes%%'" call uninstall /nointeractive
Which works......probably 98% of the time. Here is what I don't like, however.
1. It runs a repair on all appliations as it's searching for the referenced application. This is a problem when systems are monitored for changes, and these show up as (unnecessary) changes.
2. In some very minor cases, the WMI call fails which then causes the upgraded software to fail to install with an exit code of 1638 (previous version).
At the root of it, however, the approach is simple and future capable. Things were easier with only x86 Operating systems, as you could simply traverse HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall - but now the x64 code comes into play. I also read that you shouldn't hardcode the HKLM\Software\Wow6432Node... into scripts, as this path may change - rather you should use a value to redirect (escapes me at the moment).
In other environments that are faced by this (if not, lucky you) - how are you reliably uninstalling all versions of software, on x86 and x64 systems, while minimizing change?
If only vendors populated the upgrade table with any version previously released, we wouldn't have this problem ;)