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

Setup crashes right away with the message “An error [-5005 : 0x80070002] has occurred” during installation, usually before you can do anything. The code 0x80070002 means “The system cannot find the file specified,” which tells us the installer is missing an important file it needs.

error 5005 0x80070002
An error [-5005: 0x80070002] has occurred while running the setup
This usually happens because the installation file is damaged or wasn’t fully downloaded—this issue is common with audio drivers like Realtek. Sometimes, the problem can also be caused by your antivirus blocking the installer or not having the right permissions to run the installation.

These are some of the most common reasons for the error. Now, let’s go through the troubleshooting steps to fix error 5005 0x80070002 on Windows 10.

1. Use the Program Install & Uninstall Troubleshooter

Microsoft offers a Program Install and Uninstall Troubleshooter that can automatically scan and fix problems preventing you from installing or uninstalling software. This tool works on Windows 7, 8, 10, and even Windows 11.

The troubleshooter can fix installation or uninstallation issues and repair corrupted registry entries as well. However, this tool isn’t pre-installed on Windows 10 or newer versions, so you’ll need to download it first.

  1. Go to this link “here“.
  2. Click on “Download troubleshooter” to get the installer.
    Download Program Install & Uninstall Troubleshooter
  3. Open the downloaded file to launch the troubleshooter.
  4. Run the troubleshooter to start diagnosing the problem.
    Run the troubleshooter to diagnose the problem
  5. Select “Detect problems and apply fixes for me” and then click Next.
  6. Choose whether your issue is related to installing or uninstalling a program.
    Choose to install a program or uninstall a program.
  7. The troubleshooter will try to find and fix any problems it detects.
  8. When the process is finished, restart your PC and check if the error still appears.

2. Close the Application If It’s Running in the Background

If the application you’re trying to uninstall is still active in the background, the uninstall may fail and show this error. You’ll need to close the app and any related processes first.

  1. Press Ctrl + Alt + Delete and choose Task Manager.
  2. Find the application in the list, click on it, then select End Task.
    end-task
    Click on End task
  3. Look for any other processes related to the application, right-click on each, and select End Task as well.
  4. Once all related processes are closed, try uninstalling the application again and see if the error is gone.

3. Perform a Clean Boot

Sometimes, other programs or background services can interfere with software installation or removal. Performing a clean boot starts Windows with only the most essential services, which often helps fix install and uninstall errors like 5005 0x80070002.

  1. Click the Start menu and type “msconfig.”
  2. Select System Configuration from the list.
    system-configuration
    Open system configuration
  3. Go to the “Services” tab.
  4. Check the box for Hide all Microsoft services.
    Hide All Microsoft Services and Disable All Other Services in the System Configuration Utility
  5. Click Disable all to turn off all other services.
  6. Press Ctrl + Alt + Delete again and open Task Manager.
    System Configuration Startup
  7. Go to the Startup tab. Disable any item you suspect may interfere with the installer.
  8. Close Task Manager and restart your PC.
  9. Try again to see if the error is resolved. If not, move on to the next fix.

4. Use Registry Editor to Uninstall a Program

There are several ways to uninstall programs in Windows. If the usual method fails, you can use the Registry Editor to manually uninstall the program.

  1. Right-click the Start menu and select Run.
  2. Type regedit and press Enter.
    Accessing the regedit menu
  3. At the top of Registry Editor, paste this path:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
  4. Look through the folders on the left to find the program you want to uninstall. Sometimes the program’s name is shown, otherwise, you may have to check each folder.
  5. In the program’s folder, find and open the UninstallString value.
    error 5005 0x80070002
    Open the UninstallString file in Registry Editor
  6. Double-click it and copy the value data.
  7. Press Windows + R, select Run, then type cmd and click OK to open the Command Prompt.
  8. Paste the copied value into the Command Prompt and press Enter.
  9. If a path appears, copy and paste it into the Run dialog box to uninstall the program.
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.