Fix: An Error [-5005 : 0x80070002] Has Occurred While Running the Setup

Error 5005 0x80070002 usually occurs while trying to install or uninstall an application/game through the Windows installer. The error presents itself with a short error message “An error [-5005: 0x80070002] has occurred while running the setup” which accompanies certain fixes that aren’t effective in solving the error.

error 5005 0x80070002
An error [-5005: 0x80070002] has occurred while running the setup
As the error appears during the uninstallation process therefore it is clear the earlier program uninstallation process residual files are causing the error on the Windows 10 system. Despite this, there are many other culprits responsible for the error. So, we had done our research and below listed the possible solutions to solve the error.

But before starting with the solutions, first, have a look at the common culprits triggering the error 5005 0x80070002 on Windows 10.

What Causes Error 5005 0x80070002 on Windows 10?

  • Application Running in The Background: If the application you are trying to uninstall is not uninstalled completely and running in the background, then this may end up showing the error.
  • An issue in the Windows Installer: If there is any glitch in the Windows installer, or the Windows installer is not running properly then this may also cause the error, so check your Windows installer is not encountering any glitches.
  • Leftover files conflict: If the program you uninstalled earlier is not completely uninstalled then the residual leftover junk files may conflict with the program when you try to install it again and result in showing the error.
  • Corrupted program issues: Sometimes installing or uninstalling the botched programs was not completely installed or uninstalled and may result in showing this error.

So, these are some of the common culprits causing the error now try the troubleshooting solutions given to get past the error 5005 0x80070002 on Windows 10.

Use Program Install & the Uninstall Troubleshooter

Microsoft has launched a Program install and the uninstall troubleshooter which after scanning the system automatically diagnoses the problem you might be facing while uninstalling or installing any software or application on the Windows 7/8/10 and the latest Windows 11 OS as well.

This tool is capable to fix issues that block programs from getting installed or uninstalled and fixing corrupted registry entries as well, so here we advise you to run this tool. But this troubleshooter is not available in Windows 10 and newer, so you need to download the troubleshooter. To download and run the troubleshooter follow the steps mentioned below:

  1. Head over to this link “here“.
  2. Now click on the download troubleshooter to download the install and uninstall the troubleshooter.
    Download Program Install & the Uninstall Troubleshooter
  3. Then click on the downloaded file to launch the troubleshooter.
  4. And run the troubleshooter to diagnose and solve the problem.
    Run the troubleshooter to diagnose the problem
  5. And click on the “Detect problem and apply fixes for me” option and click on the Next button.
  6. Select if you are facing the issue of installing a program or uninstalling a program.
    Choose to install a program or uninstall a program.
  7. Now the troubleshooter will troubleshoot the problems.
  8. Once the process is done, restart your PC and check if the error is resolved or not.

Close the Application If Running In the Background

If the application you are trying to uninstall is running in the background, then you won’t be able to uninstall it and this error can show up. So, you need to close the application and all the tasks related to it, to uninstall the program properly. To close the application and all the related tasks follow the steps mentioned below:

  1. Press Ctrl + Alt + Delete and launch the Task Manager.
  2. Then search for the application you want to uninstall and click on the application and then select the End Task option.
    end-task
    Click on End task
  3. Now look for the application related tasks in running then end all the tasks by right-clicking on it and selecting the End task option
  4. After closing all the tasks and applications completely, try uninstalling the application and check if the error is resolved or not.

Perform Clean Boot

As said above if during installing or uninstalling the program you may face any conflict that can also leads to the error 5005 0x80070002. So in this case, it is recommended to perform a clean boot as it will disable all the useless startups and applications that are interfering with the operations of the installer and uninstall the program completely. To perform a clean boot follow the steps mentioned below:

  1. Click on the Start menu and search for Msconfig.
  2. Now click on the System configuration option.
    system-configuration
    Open system configuration
  3. Click on the Services tab.
  4. In Services, check the Hide all Microsoft services option.
    Hide All Microsoft Services and Disable All Other Services in the System Configuration Utility
  5. Select all the startups and click on the Disable all option to disable all the startups.
  6. Now press Ctrl + Alt + Delete and launch the Task Manager window.
    System Configuration Startup
  7. Then click on the Startup tab and select each item you think can interfere with the installer and click on the disable option.
  8. And close the task manager and restart your PC.
  9. Now check if you still see the error on Windows 10 or head to the next fix.

Use Registry Editor to Uninstall a Program

There are multiple ways to uninstall programs in Windows. You can do it via Control Panel, Opt for the program’s own installer or can also uninstall the program from the registry editor. As you are getting an error from the Windows installer, you can try to uninstall the program from the registry editor.

To uninstall the program from the registry editor, follow the steps mentioned below:

  1. Right-click on the Start menu and click on the Run option.
  2. Now write Regedit in the input box.
    Accessing the regedit menu
  3. Now paste this path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall at the top of the registry editor.
  4. If the name of the program is mentioned then it is well and good or else, you need to search each of the folders for the program you want to uninstall.
  5. Now in the program folder, open the UninstallString file and copy its value.
    error 5005 0x80070002
    Open the UninstallString file in Registry Editor
  6. Here you need to double click it and copy the value 
  7. Then press Windows + R and click on the Run option.
  8. Now type cmd in the input box and press Ok to open a command prompt.
  9. Paste the copied value into the command prompt and press enter.
  10. Now check if it shows any path, just copy and paste it into the run dialog box to uninstall the file.

Now check if the error 5005 0x80070002 is fixed or not. Moreover, you can also use the third-party uninstaller. There are many uninstallers available on the web, download a good third-party uninstaller, as it is capable to remove the program completely without leaving any residual and junk files. Hope the fixes given work for you to fix the error completely.

ABOUT THE AUTHOR

Hardeep Kaur


Hardeep is a passionate technical writer with more than 7 years of experience. She has a keen interest in PC games, Windows OS and everything surrounding it. She is a technology enthusiast and fascinated with technology since her childhood days.