An Error occured while trying to rename a file in the destination directory

On installing new version 0.45.15, getting this error

An Error occured while trying to rename a file in the destination directory:
MoveFIle failed:, code 5
Access is denied

All files with these error were *.png.
All skipped. Cursor was installed (User version), however during its use I still get popped up warnings with the same error (Select Action: error text)

Also tried to install the Cursor under Admin account, did not help - same issues during installation and afterwards during app use.

Version: 0.45.15 (user setup)
VSCode Version: 1.96.2
Commit: 73dd83bb6f8e3a3704ad8078a8e455ac6d4260d0
Date: 2025-02-22T10:19:07.356Z
Electron: 32.2.6
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631

2 Likes

I have the same error here.
My cursor.exe has been infected by a FileRepMalware (detected by Avast). I uninstalled the infected software, then tried to install it again from the installer available on cursor.com but I’m facing this same error.

I am also having the same error when trying to install Cursor in my Windows 11.


I would appreciate your help on how to solve this.

1 Like

samething! well i thought i did something wrong lol

I think the installation files are infected with a virus, look what I got…

working set exemption false positive

Fixing Cursor Installation Issues

Introduction

This guide addresses persistent installation issues with the Cursor application, particularly when encountering access denied errors (Code 5 or 0x80070005). These errors typically occur when files are locked, permissions are restricted, or antivirus software is interfering with the installation process.

Prerequisites

  • Administrator access to your Windows computer
  • The latest Cursor installer downloaded from the official website

Step-by-Step Solution

Step 1: Check Antivirus Quarantine

  1. Open your antivirus software
  2. Navigate to the quarantine/virus chest section (typically found under “Protection History,” “Quarantine,” or “Virus Chest”)
  3. Search for any files containing “cursor” or specifically “Cursor.exe”
  4. Select these files and choose “Restore” or “Allow”
  5. Select “Add to Exceptions” or “Whitelist” if the option is available

Step 2: Close All Instances of Cursor

  1. Press Ctrl+Shift+Esc to open Task Manager
  2. Look for any processes related to Cursor
  3. Right-click each one and select “End Task”
  4. Check for background services too by clicking “More details” if available

Step 3: Remove Taskbar Icons

  1. Right-click on any blank/broken Cursor icons in your taskbar
  2. Select “Unpin from taskbar”
  3. If icons remain stuck, try restarting Windows Explorer:
    • In Task Manager, find “Windows Explorer”
    • Right-click it and select “Restart”

Step 4: Temporarily Disable Antivirus Protection

  1. Open your antivirus software
  2. Look for an option like “Temporarily disable protection” or “Shield Control”
  3. Disable protection for 10 minutes (the specific option varies by antivirus)
  4. Make sure to check for any “Application Control” or “Real-time scanning” features specifically
  5. Some antivirus programs may require disabling multiple layers of protection

Step 5: Clean Up Previous Installation Files

  1. Press Win+R to open the Run dialog
  2. Type %LOCALAPPDATA%\Programs\cursor and press Enter
  3. Delete the entire cursor folder if it exists
  4. Press Win+R again
  5. Type %APPDATA%\cursor and press Enter
  6. Delete this folder if it exists
  7. Press Win+R again
  8. Type %TEMP% and press Enter
  9. Delete any folders that start with “Cursor” or contain “cursor” in their name

Step 6: Clean Up Windows Start Menu and Shortcuts

  1. Press Win+R to open the Run dialog
  2. Type %APPDATA%\Microsoft\Windows\Start Menu\Programs and press Enter
  3. Delete any Cursor folders or shortcuts
  4. Type %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs and press Enter
  5. Delete any Cursor folders or shortcuts here as well

Step 7: Run the Installer as Administrator

  1. Right-click on the Cursor installer
  2. Select “Run as administrator”
  3. Follow the installation prompts
  4. If asked for a different installation location, consider choosing a location outside of standard AppData paths

Step 8: Post-Installation Steps

  1. Re-enable your antivirus protection
  2. Add an exception for Cursor in your antivirus settings:
    • Typically found under “Exclusions” or “Exceptions”
    • Add both the Cursor executable and its installation folder:
      • C:\Users\[YourUsername]\AppData\Local\Programs\cursor\Cursor.exe
      • C:\Users\[YourUsername]\AppData\Local\Programs\cursor\
  3. Restart your computer to ensure all changes take effect

Troubleshooting Additional Issues

If Antivirus Repeatedly Quarantines Cursor

  1. Create a permanent exception before reinstalling:
    • In your antivirus settings, go to Exceptions/Exclusions
    • Add the path where Cursor will be installed
    • Add file type exceptions for .exe files in that path
    • Some antivirus programs may have behavior monitoring that needs separate exceptions

If Installation Still Fails

  1. Try booting Windows in Safe Mode and installing from there
  2. Check Windows Event Viewer for specific error details:
    • Press Win+R, type eventvwr and press Enter
    • Look under “Windows Logs” → “Application” for errors during the time of installation

If Specific Files Remain Locked

  1. Download and run Process Explorer from Microsoft Sysinternals
  2. Use Find → “Find Handle or DLL”
  3. Search for “cursor” to identify which processes are locking files
  4. Close the identified processes and retry installation

Preventative Measures for Future Updates

  • Always close Cursor completely before updates
  • Consider temporarily disabling antivirus during updates
  • Keep Windows and your antivirus definitions updated
  • Create permanent exceptions in your antivirus for the Cursor application

Additional Resources

  • Official Cursor support website
  • Windows troubleshooting guides for application installation issues
  • Microsoft’s documentation on error code 0x80070005
1 Like


I have the same error in Windows 11

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.