Script to remove MSXML4 silently

08-28-2015 12:45 PM

Script to remove MSXML4 silently

We have run into an issue where an old version of MSXML (4), now unsupported, is lighting up on security scans. ArcGIS Desktop up to 10.3 requires this software (and the installer will put it back if you try to remove it). But Desktop 10.3.1 and later doesn't need it. This script will remove MSXML 4 from a machine (unless some other software puts it back).

I've also posted apython script you can use to check your machine for MSXML4 vulnerability. Note other software can cause this vulnerability, but ArcGIS 10.3 and earlier definitely will.

:: RemoveMSXML4.bat
:: Removes MSXML4 from a system
:: BUG-000082328: ArcGIS for Desktop 10.2.2 installs Microsoft XML Core 
::   Services (MSXML) 4.0 Service Pack 2 automatically. MSXML 4.0 has some vulnerability issues.
::   (Only open to Esri customers with support right-to-call as of 3/7/2015)
:: ArcGIS 10.2.2 for Desktop Hot Fix QFE-1022-DT-306076 (available on request from Esri)
:: List of Microsoft XML parser (MSXML) versions
:: Uninstall commands for MSXML 4.0

@echo off

:: MSXML 4.0 SP2 and updates

echo Removing MSXML 4.0 SP2 ... 
:: MSXML 4.0 SP2 Parser and SDK (Base Installer - msxml.msi)
msiexec /x {716E0306-8318-4364-8B8F-0CC4E9376BAC} /qb-
:: KB925672 (MS06-061 - msxml4-KB925672-enu.exe)
msiexec /x {A9CF9052-F4A0-475D-A00F-A8388C62DD63} /qb-
:: KB927978 (MS06-071 - msxml4-KB927978-enu.exe)
msiexec /x {37477865-A3F1-4772-AD43-AAFC6BCFF99F} /qb-
:: KB936181 (MS07-042 - msxml4-KB936181-enu.exe)
msiexec /x {C04E32E0-0416-434D-AFB9-6969D703A9EF} /qb-
:: KB954430 (MS08-069 - msxml4-KB954430-enu.exe)
msiexec /x {86493ADD-824D-4B8E-BD72-8C5DCDC52A71} /qb-
:: KB973688 (Non Security Update - msxml4-KB973688-enu.exe)
msiexec /x {F662A8E6-F4DC-41A2-901E-8C11F044BDEC} /qb-

:: MSXML 4.0 SP3 and updates

echo Removing MSXML 4.0 SP3 ... 
:: MSXML 4.0 SP3 Parser (Base Installer - msxml.msi)
msiexec /x {196467F1-C11F-4F76-858B-5812ADC83B94} /qb-
:: KB973685 (Non Security Update - msxml4-KB973685-enu.exe)
msiexec /x {859DFA95-E4A6-48CD-B88E-A3E483E89B44} /qb-
:: KB2721691 (MS12-043 - msxml4-KB2721691-enu.exe)
msiexec /x {355B5AC0-CEEE-42C5-AD4D-7F3CFD806C36} /qb-
:: KB2758694 (MS13-002 - msxml4-KB2758694-enu.exe)
msiexec /x {1D95BA90-F4F8-47EC-A882-441C99D30C1E} /qb-

:: If these are not removed by the uninstallers, manually delete them.
echo Removing MSXML4 files ... 
del /q %SystemRoot%\System32\msxml4*.dll >NUL 
del /q %SystemRoot%\SysWOW64\msxml4*.dll >NUL 

Thanks for sharing Curtis. I haven't heard this as a complaint from our network services yet, but good to know if/when they do.

Version history
Last update:
‎12-12-2021 03:43 AM
Updated by: