Scripted clean uninstall of ArcGIS Pro

2436
0
03-07-2021 06:34 PM
Labels (1)
MarcusBrown
New Contributor II

tl;dr I wrote a script to remove the folders and registry keys left behind after a typical ArcGIS Pro uninstall. The process is described here and implemented in PowerShell. Thought it might be useful if you're really in a bind.

This script definitely modifies your user environment! Read through it and make sure you understand what it does BEFORE running it on any production system.

I'm currently dealing with a problem described here: Solved: Can't login to ArcGIS Pro, login screen stays empt... - Esri Community. I can't immediately implement the solution presented in that post due to a Windows group policy object preventing adding www.arcgis.com to the trusted sites list. My colleague described a temporary work-around which involved a clean uninstall as described here: Clean uninstall of ArcGIS Pro - Esri BeLux. This involved removing any folders and registry keys left behind by the ArcGIS Pro uninstaller. Since this problem is affecting a number of my coworkers, I decided to automate the steps described in the blog post to provide a temporary solution until we can get a better solution.

The script basically goes through each of the steps listed in the 'Clean uninstall of ArcGIS Pro' post except it does step 5 first. Step 5 is 'Check to make sure that the license isn’t checked out to work offline.' and I can't think of any reason to wait until step 5 to do this. So the script will exit out before making ANY changes if there are checked-out licenses. Simply release the license and re-run the script. This will

  • uninstall the program,
  • remove the folders in Program Files and the current user's AppData folder, and
  • delete the registry keys mentioned in the blog post.

I tried to do a fair amount of validation before and after removing folders and registry keys. One exception is the uninstall of the ArcGIS Program, which I assume completes successfully. Please note, this will not remove folders in other user's profiles on the same machine, it will only do so for the current user. Please also note, you should run this script as Admin and add in the -whatif parameter where necessary. If you don't know what both of those things mean, you should find someone who does and get them to run this script for you or just do the process manually. That said, I found this script useful and thought I would pass it along because... if you need a script like this - you're probably not having a good day already.

0 Replies