League Of Legends path updater for iCUE profiles

Tired of having to change your League of Legends profile every time it updates? Me too, I've been trying to find this since I got my K70 lux. Yesterday I got tired of searching and decided to do it myself. 2 hours later, I had it working!



As you will probably know if you play LoL, every single update of the game changes the "League of Legends.exe" path, and iCUE will not automatically update the profile, so you would have to manually change it yourself.

Also, this works for every game that will change its path, not only LoL.



Things you will need: Notepad++

iCUE (obviously)

Patience or to know what you are doing

I found profiles are stored at " %appdata%\Corsair\CUE\profiles ". They all have "random" names, so the best way to find the one you want if you have many is to add an icon to it, so a .jpg file with the same name will appear in that folder.



Now that you know which one it is, it will be something like this " {7bd1a4fc-63f6-45b3-bf7d-8b676e50499d}.cueprofiledata "



Ok, so what we want to do is a script that will open League Of Legends, wait a few seconds (or minutes, depending on your internet/PC speed), then kill iCUE process, update your profile, and start iCUE again, minimized to tray.

Create a .bat file

Just create a new txt file with notepad and name it whatever you want with .bat extension. I named it "corsair.bat". Now just start adding the following code lines. Using Notepad++ will make it much easier.



Start League of Legends

This will start the client, then we add a timeout to let it update, you can put the time you want. I did 30 seconds:

Code: start "" "C:\Riot Games\League of Legends\LeagueClient.exe" timeout /T 30 /nobreak Kill iCUE process

We need to kill the iCUE process so that it will apply our changes:

Code: taskkill /F /IM iCUE.exe Find "League of Legends.exe"

This is where the fun begins. This will find League of Legends in this path, and return the full path as variable "p" so we can use it in iCUE. If you installed LoL somewhere else than "C:\Riot Games", change it accordingly:

Code: for /r "C:\Riot Games\League of Legends\RADS\solutions\lol_game_client_sln\releases" %%a in (*) do if "%%~nxa"=="League of Legends.exe" set p=%%~dpnxa Copy your profile file:

I know there are better ways to do this, feel free to improve my work.

Open your "cueprofiledata" file with notepad and copy all the contents to your bat file.

Now you must add "echo" to the start of every single line.

In Notepad++, select all the lines you copied and hit CTRL + H.

In "Find what" type "^".

In "Replace with" type "echo".

Then select the option "Regular expression" at the bottom, and hit "Replace All".

Now we need to replace all special characters so they dont break everything. These are all the special characters you need to find and replace.

For example, find all "<" characters and replace them with "^<"



Add our variable to the linkedProgramPath line

Find the "linkedProgramPath" and replace the path with %p%

Do this after you have replaced all the special characters, this is an actual variable we want to use.

Your line should look like this:

Code: echo ^<linkedProgramPath^>%p%^</linkedProgramPath^> Write all to the cueprofiledata file

Now we need to tell the script to write all of this to our file. So find the first line and add a "(" before it, like this:

Code: ( echo ^<?xml version^=^"1.0^" encoding^=^"utf-8^"?^> echo ^<cereal^> echo ^<profile^> echo ^<cereal_class_version^>301^</cereal_class_version^> ...

Code: ... echo ^</profile^> echo ^</cereal^> )>"%appdata%\Corsair\CUE\profiles\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.cueprofiledata" Start iCUE again

Now we start iCUE, but add --autorun so that it starts minimized to tray! If you installed iCUE somewhere else, change the path.

Code: start "" "C:\Program Files (x86)\Corsair\Corsair Utility Engine\iCUE.exe" --autorun [OPTIONAL] Hide the cmd window and create a shortcut

If you don't want the cmd window to popup every time, just create a .vbs file and add this:

Code: set w = CreateObject("WScript.Shell") W.Run chr(34) & "C:\corsair.bat" & chr(34), 0 set w= Nothing

Now make a shortcut to that vbs file, change its name to League of Legends, change its icon to LeagueClient.exe and nobody will ever notice!

So that's how I solved the League of Legends problem. Please, let me know if it helped you or if you have any problems!



I have attached my bat file so that you can check it out. I highly recommend you make your own , though. This contains the paths for my own system, and my own profile, so dont expect it to work right off the bat!! (pun intended).

Needless to say, this comes with absolutely no warranty, if you delete system32, it's not my fault! Hey guys,Tired of having to change your League of Legends profile every time it updates? Me too, I've been trying to find this since I got my K70 lux. Yesterday I got tired of searching and decided to do it myself. 2 hours later, I had it working!As you will probably know if you play LoL, every single update of the game changes the "League of Legends.exe" path, and iCUE will not automatically update the profile, so you would have to manually change it yourself.Also, this works for every game that will change its path, not only LoL.Things you will need:I found profiles are stored at "". They all have "random" names, so the best way to find the one you want if you have many is to add an icon to it, so a .jpg file with the same name will appear in that folder.Now that you know which one it is, it will be something like this "Ok, so what we want to do is a script that will open League Of Legends, wait a few seconds (or minutes, depending on your internet/PC speed), then kill iCUE process, update your profile, and start iCUE again, minimized to tray.So that's how I solved the League of Legends problem. Please, let me know if it helped you or if you have any problems!I have attached my bat file so that you can check it out., though. This contains the paths for my own system, and my own profile, so dont expect it to work right off the bat!! (pun intended).Needless to say, this comes with absolutely no warranty, if you delete system32, it's not my fault! Attached Files corsair.zip (18.8 KB, 104 views)