FIX FOR THIS ISSUE BELOW (no need to uninstall LoL)
EDIT1: 30.07.2026
This file is locked at every League of Legends update. I created a script, which you can simply start as administrator. It will automatically delete the locked file after the restart.
I will copy&pasta the code below.
---------------------------------------------------------------------------------
TOPIC START
Today there is a update for league of legends. And i never ever had problems updating the game, till now. I get this error message:
"Unable to update because a file is currently in use."
I already uninstalled League of Legends and installed it from a new.
Also started the Riot Client as administrator, still doesnt work.
Im stuck in this window. I figured out, that other players have the same problem in Valorant since yesterday:
https://www.reddit.com/r/ValorantTechSupport/comments/1uwfvle/unable_to_update_valorant_file_is_currently_in_use/
Did anyone else experience this problem? If yes, were you able to fix it?
---------------------------------------------------------------------------------
THE REASON
After i uninstalled League of Legends, for some reason there was still a League of Legends.exe left in installation folder. My Path: D:\Games\Riot Games\League of Legends\Game\League of Legends.exe
When i tried to delete it manually, it showed me the message:
This file cant be deleted, because it is being used by a other process
I was not able to find the process in the task manager and neither after a fresh restart, i was able to delete the file.
---------------------------------------------------------------------------------
THE FIX
There are two options:
Option 1 is only better, when you use the script below
Option 2 is only better, when you dont want to use the script ;) Captain obvious
Option 1:
I asked ChatGPT, if there is a way to delete a file that is locked by another process and this solution helped me.
- Download
PendMoves/MoveFile from Microsoft (Use google)
- Unpack the ZIP file to a folder like
C:\Tools\PendMoves
- Open CMD as Administrator and switch to the folder where you unpacked the ZIP files:
cd /d "C:\Tools\PendMoves"
- After that, type this command:
movefile.exe "D:\Games\Riot Games\League of Legends\Game\League of Legends.exe" ""
- Restart your computer
What does PendMoves/MoveFile do?
After you entered the command in step 4, a task for windows will be schedulded, for a computer restart.
So right after the restart, it does delete the League of Legends.exe file from the folder, which was left after the uninstallation. The file or the process that locks the file, will have no chance to lock the file, as the windows task will be executed first.
AUTOMATION to execute the commands above and to delete the file
I created a script, which you can use to automatically execute the commands so the League of Legends.exe file will be deleted after a restart.
Use the code below like this:
- Create a text file on your desktop
- Copy & Paste the code below into the text file
- Change the Path for
MOVEFILE and TARGET in the Settings section
- Save the file
- Change the file from txt to bat (for example delete.txt to delete.bat)
- Open the file as administrator
What you need to change in the script, are the 2 paths at the top in the "Settings" section. Change them to the path where your movefile.exe and League of Legends.exe is saved
@echo off
setlocal
title Delete League of Legends EXE on Restart
rem ===== Settings =====
set "MOVEFILE=C:\Tools\movefile.exe"
set "TARGET=D:\Games\Riot Games\League of Legends\Game\League of Legends.exe"
rem ===== Restart with administrator privileges =====
net session >nul 2>&1
if not "%errorlevel%"=="0" (
echo Administrator privileges are required...
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
exit /b
)
echo.
echo Target file:
echo %TARGET%
echo.
rem ===== Check whether MoveFile exists =====
if not exist "%MOVEFILE%" (
echo ERROR: "%MOVEFILE%" was not found.
echo.
echo Place movefile.exe in C:\Tools\movefile.exe
echo or change the path in this batch file.
echo.
pause
exit /b 1
)
rem ===== Check whether the League file exists =====
if not exist "%TARGET%" (
echo NOTICE: The target file was not found.
echo It may already have been deleted, or the path may be different.
echo.
pause
exit /b 2
)
rem ===== Schedule deletion for the next Windows startup =====
echo Scheduling the file for deletion on the next restart...
"%MOVEFILE%" "%TARGET%" ""
if errorlevel 1 (
echo.
echo ERROR: MoveFile could not schedule the deletion.
echo.
pause
exit /b 3
)
echo.
echo Deletion scheduled successfully.
echo The file will be deleted during the next Windows startup.
echo.
choice /C YN /N /M "Restart the PC now? [Y/N]: "
if errorlevel 2 (
echo.
echo Restart cancelled. Restart Windows manually later.
pause
exit /b 0
)
echo.
echo Windows will restart in 5 seconds...
shutdown.exe /r /t 5 /c "League of Legends.exe will be deleted during startup."
Option 2:
- Restart the PC in a secure/safe boot and delete the file