I picked up an extremely useful tip today. To cut a long story short I had to manage the deployment of an aging custom application upgrade. All good and well until you realise the app is unaware of any useful command line installation switches, let alone uninstall switches. I needed to uninstall an old version before the installation of a newer version. Well here comes wmic to the rescue!
1. Open a command prompt windows and enter wmic
2. wmic:rootcli>product get name
3. wmic:rootcli>product where name=”%ENTER APPLICATION NAME HERE” call uninstall
4. You can even add the /nointeractive switch to disable prompts (ideal if you’re task sequencing via SCCM for example…)
There you have it, application uninstalled. All you need to do now is add the install parameters after this sequence in the script and you have a complete ‘upgrade’ package – ideal for those bespoke applications that can be totally ‘deploy’ unaware!