The Corsair User Forums  

Go Back   The Corsair User Forums > Corsair Product Discussion > iCUE Software

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 12-08-2018, 10:56 AM
TheYosiFTW TheYosiFTW is offline
Registered User
TheYosiFTW's PC Specs
 
Join Date: Dec 2018
Location: Spain
Posts: 1
POST ID # = 984361
TheYosiFTW Reputation: 12
Lightbulb League Of Legends path updater for iCUE profiles

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:
  • 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.
  1. 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.

  2. 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
  3. Kill iCUE process
    We need to kill the iCUE process so that it will apply our changes:
    Code:
    taskkill /F /IM iCUE.exe
  4. 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
  5. 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 "^<"

  6. 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^>
  7. 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^>
    ...
    Then find the last line and do the opposite, then add ">" and the path to your cueprofiledata file in %appdata%:
    Code:
    ...
    echo 	^</profile^>
    echo ^</cereal^>
    )>"%appdata%\Corsair\CUE\profiles\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.cueprofiledata"
  8. 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
  9. [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
    Change "C:\corsair.bat" to wherever your .bat file is.
    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!
Attached Files
File Type: zip corsair.zip (18.8 KB, 62 views)
Reply With Quote
Reply

Tags
icue, league of legends, path, profile, script

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:35 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.