How to fix your League of Legends Registry Paths (OP.GG fix)
Artist: Awskitee
The issue
If you play League of Legends and use any third party tools (to record replays, enhance gameplay, among other things :p) then you have probably run into programs that ask for the path of your League of Legends directory. Fortunately, some programs can auto detect this using the Windows registry. However, if you have moved your League of Legends folder to another folder, reinstalled/upgraded Windows or used a registry cleaner in the past then its possible that your registry entries are corrupt. This means they either don't exist or don't point to the correct path.
This is a common issue for most people who cannot watch OP.GG replays as the OP.GG replay batch files rely on the RADs path to function correctly. You might have run into this error:
KR: LOL 경로를 자동으로 찾을 수 없습니다. 도움말에서 관전하기 문제 해결을 보시면 100% 해결 될 수 있습니다. 100% 해결 될 수 있으니, 채팅방에서 괜히 사서 고생해서 물어보지마세요!!!!!!!
EN: Cannot found LOL directory path for automatic. Please see our spectate help page: http://oce.op.gg/help/observer
OP.GG has a section on their website that can allow you to set the path manually (which will be reflected in downloaded batch files) but this must be done for each region and every now and again which is not ideal. For the OCE server, the instructions are under the League of legend.exe file can not be found header at https://www.op.gg/spectate/help
A permanent solution
I decided to write a script that can fix this issue for third party applications and web apps.
Simply copy and paste the following code into a text file (.txt) using a text editor of your choice (ie notepad).
Then save the file with a .bat extension (call it anything you like such as fix.bat).
Now simply right click the file and Run as Administrator .
Finally, follow the on screen instructions and choose your system architecture (32 bit/64 bit) and enter the path to your LoL folder. If you do not know your system architecture then run the program twice and use both options.
Download Link:
LoL RADS Registry Fixer.batBatch script:
@echo off
setlocal enabledelayedexpansion
cls
echo ----------------------------------------------
echo LoL RADS Registry Fixer by PersianMG (https://mobeigi.com/blog/)
echo ----------------------------------------------
:: Ask for 64bit or 32 bit
:getArch
set /p "targetArch=Are you on a 32bit or 64bit machine [enter 32 or 64]?: "
if %targetArch% NEQ 32 (
if %targetArch% NEQ 64 (
echo "Invalid architecture."
goto getArch
)
)
:: Get LoL Directory Path
:getPath
set /p "lolpath=What path is League of Legends installed in? [ie: C:\Riot Games\League of Legends]: "
:: Check for valid path
if ["%lolpath%"] == [] (
echo Empty path is not allowed.
goto getPath
)
if not exist "%lolpath%" (
echo Path points to folder that does not exist.
goto getPath
)
:: Add /rads to path
set lolpath=%lolpath%\RADS
echo Key values will be set to the following RADS path: %lolpath% & echo.
:: Add 32 bit registry keys
if %targetArch% EQU 32 (
echo Fixing key: HKCR\VirtualStore\MACHINE\SOFTWARE\Riot Games\RADS
reg add "HKCR\VirtualStore\MACHINE\SOFTWARE\Riot Games\RADS" /v LocalRootFolder /t REG_SZ /d "%lolpath%" /f & echo.
echo Fixing key: HKCU\SOFTWARE\Riot Games\RADS
reg add "HKCU\SOFTWARE\Riot Games\RADS" /v LocalRootFolder /t REG_SZ /d "%lolpath%" /f & echo.
echo Fixing key: HKLM\SOFTWARE\Riot Games\RADS
reg add "HKLM\SOFTWARE\Riot Games\RADS" /v LocalRootFolder /t REG_SZ /d "%lolpath%" /f & echo.
)
:: Add 64 bit registry keys
if %targetArch% EQU 64 (
echo Fixing key: HKCR\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Riot Games\RADS
reg add "HKCR\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Riot Games\RADS" /v LocalRootFolder /t REG_SZ /d "%lolpath%" /f & echo.
echo Fixing key: HKCU\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Riot Games\RADS
reg add "HKCU\SOFTWARE\Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Riot Games\RADS" /v LocalRootFolder /t REG_SZ /d "%lolpath%" /f & echo.
echo Fixing key: HKCU\SOFTWARE\Riot Games\RADS
reg add "HKCU\SOFTWARE\Riot Games\RADS" /v LocalRootFolder /t REG_SZ /d "%lolpath%" /f & echo.
echo Fixing key: HKLM\SOFTWARE\Wow6432Node\Riot Games\RADS
reg add "HKLM\SOFTWARE\Wow6432Node\Riot Games\RADS" /v LocalRootFolder /t REG_SZ /d "%lolpath%" /f & echo.
)
echo All keys fixed!
@pause