Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

What it is the simplest and most straightforward way to uninstall any and all ArcGIS products more or less in one go that might be present on a Windows machine? perhaps scriptable?

Add/Remove Programs from the Control Panel is straightforward, but when there a several products installed it's a process of click-click-click, wait for product 1 to be uninstalled, which could take some time, then click-click-click for #2, and so on. This is okay for one machine but when there are several it's real pain.

share|improve this question
    
I'm not sure I would trust a script to do it right, especially if you have any custom/3rd party extensions/add-ins, which should be uninstalled first. –  blah238 Jan 28 '13 at 19:00
    
This is only partly tongue-in-cheek, but it's sometimes easier to reformat the hard drive, reinstall Windows and start over than to uninstall ArcGIS, all its components, updates, extensions, etc. I recently tried updating to ArcGIS Desktop 10.1 and the setup routine kept telling me I couldn't because I still had components of an earlier version installed, which as far as I could tell I didn't. I have a hard drive image of the computer pre-Arc installation, I ended up reimaging it. –  Dan C Jan 28 '13 at 19:07
    
Python is also a pain point; when it is uninstalled it will leave behind traces of any site packages or modules not installed with the ArcGIS distribution. –  blah238 Jan 28 '13 at 21:16
    
thanks for reminding me about python modules @blah238, I added an answer to help with that. –  matt wilkie Jan 28 '13 at 22:50

4 Answers 4

up vote 11 down vote accepted

I do it with a batch file. You could write the code below as a single line, or by updating locations you could create a loop of paths/installers.

SET INSTALL_PATH=\\myNetworkShare\InstallerLocation\

MSIEXEC.EXE /X %INSTALL_PATH%\setup.msi /QB

The following KB articles provide a good starting place:

Install/Uninstall using Batch files

Silent Uninstall

Edit: just to clarify, using the 2nd article, you can use the GUID, so then you dont need to reference the original installer. I guess one method will make more sense for your script/batch file

share|improve this answer
    
This is our method using Silent un-installs –  Mapperz Jan 28 '13 at 19:11

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

Remove the /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, and some of 10.2. 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. It only works for programs which use the msi installer in the first place, so things like ArcPad are not included.


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)'" ^
   call Uninstall

Uninstall anything with ArcGIS in the title, all in one go (note the quirky wildcard syntax):

wmic product where ^
   "name like '%ArcGIS%'" ^
   call Uninstall

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 InstallPath

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 assoc and ftype to check and possibly correct the file associations:

Show association:

assoc .py=
.py=Python.File

ftype Python.File
Python.File="C:\Python26\python.exe" "%1" %*

Delete association:

assoc .py=
ftype Python.File=

(courtesy of @dash-tom-bang on Stack Overflow, also check for .pyc, .pyw)

share|improve this answer
1  
+1 for the PATH tools, those look handy. –  blah238 Jan 28 '13 at 23:09
    
I've updated the batch file for better maintainability, uses a text file for product codes & names now, and moved to GitHub 'cause more arcgis code lives there; uninstalls 10.2 desktop. –  matt wilkie Nov 13 '13 at 19:45

Be sure you uninstall all 3rd party arcgis extensions before uninstalling ArcGIS. Often 3rd party (un)installers check to make sure the appropriate Esri libraries are present before allowing installation - or uninstallation!

For example, say you have a 3rd party Arcmap extension written for 10.0, and you uninstall ArcGIS 10.0, then install ArcGIS 10.1. When you upgrade to 10.1, the 3rd party extension may or may not work. At any rate, when you try to uninstall the 10.0 version of the extension, the uninstaller will complain that required libraries are missing (the 10.0 libraries in other words.)

The painful solution is: uninstall 10.1, re-install 10.0, uninstall the 3rd party extensions, uninstall 10.0, re-install 10.1.

I've tried other solutions, like ccleaner, but with limited success. If there's a more reliable, and less painful way, I'd certainly like to hear about it.

share|improve this answer
    
Kirk can you name a 3rd party extension which does this? I'd like to test to see if the msiexec /x %product_code% route sidesteps this situation. –  matt wilkie Jan 28 '13 at 19:26
    
Can I plead the 5th? –  Kirk Kuykendall Jan 28 '13 at 19:28
    
I am not sure, but I think the Data Interoperability extension also falls under this category. Be sure to uninstall it first. –  blah238 Jan 28 '13 at 19:55
    
terrago, ettools. –  Brad Nesom Jan 28 '13 at 20:19
2  
The easiest way I know of to see what 3rd party tools are installed is to go into Categories.exe, and check the Hide Esri Components. Each folder with a + next to it should then indicate there's a 3rd party tool installed. It would be nice if Esri's uninstaller had an option to perform this scan and warned of third party tools installed. –  Kirk Kuykendall Jan 28 '13 at 20:50

For completeness sake, there is also Esri's own Uninstall Utility, which is on all original installation media.Read the guide to see which products are excluded (chiefly ArcSDE and License Manager). The link points to 10.1, there will be a new uninstall page & utility with each major release.

Note the utility only removes previous versions.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.