Jump to content
Corsair Community

Cygwin script to auto-rename cpuid related files


Recommended Posts

tl;dr Download this script and run it in a Cygwin terminal with administrator privileges to fix iCUE by renaming cpuid-related files.


I am not very familiar with batch scripts or powershell; however I do use Cygwin under all my Windows installations and like everyone else I am/was having issues with BSODs and high CPU usage from the Corsair iCUE services, so I wrote a quick shell script that will automate this: https://gist.github.com/tonylambiris/6a88d1ae2a420aade0a817096a8582f6



CORSAIR_DIR='C:\Program Files (x86)\Corsair\CORSAIR iCUE Software'

function isadmin() {
   net session &>/dev/null
   return $?

if ! $(isadmin); then
   echo "Requires administrator privileges to run."
   exit 1

if test -d "${CORSAIR_DIR}"; then
   pushd "${CORSAIR_DIR}" >/dev/null
   find . -iname '*cpuid*' -not -iname '*.bak' -exec mv -fv "{}" "{}.bak" \;
   popd >/dev/null


You will have to save the code above to a file by either copy/pasting or from the link (I have mine named fix_corsair.sh) and then in a Cygwin terminal run "chmod +x fix_corsair.sh" so the script will be executable.


IMPORTANT: In order for this to successfully run you need to run a new Cygwin terminal as administrator or else it won't work.


Without administrator privileges:

user@DESKTOP ~
$ ~/Documents/fix_corsair.sh
Requires administrator privileges to run.


With administrator privileges:

user@DESKTOP ~
$ ~/Documents/fix_corsair.sh
'./Corsair.Module.CpuIdDevice.dll' -> './Corsair.Module.CpuIdDevice.dll.bak'
'./Corsair.Service.CpuIdRemote.exe' -> './Corsair.Service.CpuIdRemote.exe.bak'
'./Corsair.Service.CpuIdRemote.exe.config' -> './Corsair.Service.CpuIdRemote.exe.config.bak'
'./Corsair.Service.CpuIdRemote64.exe' -> './Corsair.Service.CpuIdRemote64.exe.bak'
'./Corsair.Service.CpuIdRemote64.exe.config' -> './Corsair.Service.CpuIdRemote64.exe.config.bak'
'./cpuidsdk.dll' -> './cpuidsdk.dll.bak'
'./cpuidsdk64.dll' -> './cpuidsdk64.dll.bak'
'./CpuIdWrapper.dll' -> './CpuIdWrapper.dll.bak'
'./CpuIdWrapper64.dll' -> './CpuIdWrapper64.dll.bak'


It is safe to run whether the files have already been renamed or not, as I specifically check for that in the find command.


Also, double-check to ensure the variable CORSAIR_DIR points to your correct installation path as it will check to ensure whatever directory CORSAIR_DIR points to is valid before doing anything (the default installation path is defined and should work for 99% of users).


If you're not familiar with Cygwin, it's a free distribution of popular GNU and other Open Source tools running on Microsoft Windows. However if you don't have Cygwin installed or don't use it, porting the core of it's functionality should be fairly trivial to those more familiar with batch/powershell than I am.


I didn't include any extra steps like messing around with services or applications. I would make sure iCUE isn't running first and foremost, and then after running reboot your computer just to be safe (in case the services running loaded any DLL files that were renamed).


Sorry this post is kind of long, I wanted to include as much info as possible as it does rename files that typically can only be changed with administrator privileges.


Hope someone can find this useful.

Link to comment
Share on other sites


  • Create New...