This recipe works for us, an extended version of KHibma's answer. There may be better methods but this does well enough for us right now -- grab the Windows registry product codes from HowTo: Silently uninstall ArcGIS products and feed them to msiexec:
msiexec /x %product_code% /qn /passive
/passive to run silently (no pop-up progress window).
I've put together uninstall-ALL-ArcGIS-products.bat which removes all ArcGIS products from 8.2 through 10.1. There's no intelligence to it, no testing to see if something is actually there, it just brute forces it's way through the list.
A more targeted and flexible approach would be to leverage Windows Management Instrumentation Command-line (WMIC).
Uninstall a single named program:
wmic product where ^
"name = 'ArcGIS 10.1 SP1 for Desktop Background Geoprocessing (64-bit)'" ^
Uninstall anything with ArcGIS in the title, all in one go (note the quirky wildcard syntax):
wmic product where ^
"name like '%ArcGIS%'" ^
Many more useful examples at WMIC Snippets, such as listing installed programs:
wmic product where "Name like '%ArcGIS%'" ^
get Name, IdentifyingNumber, Version
wmic product where "Vendor like '%Environmental Systems Research Institute%'" ^
get Name, Version, InstallDate, InstallLocation
I elected not to use wmic because the queries take a very long time to return (it's tempting to think it's hung, looking at a blank and unblinking shell prompt for many tens of seconds. It's probably not though).
Python is a bit of separate beast. For example if python was installed with ArcGIS, uninstalling ArcGIS will also uninstall python, but any 3rd party modules added afterwords will be left behind.
Assuming one wants to completely remove Python 2.6 and any associated material (blind copy and paste without understanding not advised):
Remove all Python files for this version on disk:
rd /s/q C:\Python26
Remove registry keys with REG:
reg delete HKLM\SOFTWARE\Python\PythonCore\2.6 /f
reg delete HKCU\SOFTWARE\Python\PythonCore\2.6 /f
If python was not installed in the usual place, you can retrieve it's location with
reg query HKLM\SOFTWARE\Python /s and watch for
The last step is remove any Python 2.6 entries from the PATH environment variable, but I've yet to come up with a straightforward (scriptable) way of doing this without installing more tools. That said, Edit the PATH environment variable in Windows without pain is a great resource for said tools.
Also possibly needed is
ftype to check and possibly correct the file associations:
Python.File="C:\Python26\python.exe" "%1" %*
(courtesy of @dash-tom-bang on Stack Overflow, also check for