We recently received a request to post a tutorial that demonstrates how to use BatchPatch to remove Internet Explorer (IE) versions 9, 10, and 11 from target computers. No problem. Below is a step-by-step guide to removing previous versions of Internet Explorer.
Microsoft explains here how to use the command line to perform an IE uninstallation. We’re going to utilize this method from inside of BatchPatch to execute the removal on multiple machines simultaneously.
- First let’s create a simple cmd/bat file that contains the commands we need to uninstall Internet Explorer. On your computer create a text file and name it something similar to “Uninstall IE 9-10-11.cmd”
- Paste the following lines into the body of the cmd file:
REM Remove IE 9 FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*9.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /norestart" REM Remove IE 10 FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*10.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /norestart" REM Remove IE 11 FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*11.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /quiet /norestart"
Note, if you only want to remove a particular version of IE instead of removing all 3 versions that we’re removing, then modify the .cmd file to only contain removal code for the versions that you want to remove.
- Now we can highlight the desired target hosts in our grid, and then select ‘Actions > Deploy > Create/modify deployment’. We are going to configure the deployment to deploy the .CMD file that we created in the previous step.
- Finally we can execute the uninstallation by clicking ‘Execute now’ in the ‘Deployment’ window.
- When the script completes, it’s not a bad idea to reboot the target computers, which you can do from the BatchPatch console using ‘Actions > Reboot.’