In this post I will show you how you can use autoit Script to deploy an application and silently remove all previous version.
First, you’ll need to install AutoIt, create and compile the script, copy the script and the files in the source directory of your program. Next, create the package, program and advertisement in SCCM.
For my part, I created a collection with clients who already have the software installed, create a sub collection of device which is not member of and add queries to filter the device who doesn’t meet the minimum requirement of the software, then finally advertise the sub collection.
So the script will scan the registry (uninstall key’s) to find the following values; DisplayName, DisplayVersion, QuietUninstall, Uninstall and Based on the value of the $Software variable it will uninstall previos version, but be careful, you must be sure that the value will only affect the targeted software, otherwise …
In this example, we will deploy adobe reader 10.1.0, silently uninstall previous version ( tested for version 6.1 and later).
- - First create a mst file for adobe, if needed you can find out in this article… thanks to Aaron Parker for his excellent post http://blog.stealthpuppy.com/deployment/deploying-adobe-reader-x/
- - Download the following script and compile it with autoit; UninstallerScript
- - Finally create your package, program and advertisement in SCCM
To be successfull you must modify the value of
$Software = “Adobe reader”
$apps1 = “C:\Adobe\fr\AcroRead.msi”
$Mst = “C:\Adobe\fr\AcroRead.mst”
in the autoit script .