Advertisement
Guest User

Aorus RGB Fusion profile changer

a guest
Apr 9th, 2019
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.59 KB | None | 0 0
  1. REM reading current profile from regisrty
  2. FOR /F "skip=2 tokens=2,*" %%A IN ('reg.exe query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Gigabyte\AppCenter\ApInfo\RGBFusion" /v "Profile"') DO set "currentState=%%B"
  3. set currentState=%currentState:~2,1%
  4.  
  5. REM set your profiles numbers here
  6. set prDay=3
  7. set prDusk=2
  8. set prNight=1
  9. set prSpecial=4
  10. set prGame=5
  11. set prSet=%prDay%
  12.  
  13. REM check if specific app/game is running. If yes then ommit all other checks.
  14. tasklist /FI "IMAGENAME eq X-Plane.exe" 2>NUL | find /I /N "X-Plane.exe">NUL
  15. IF "%ERRORLEVEL%"=="0" (
  16.     set prSet=%prGame%
  17.     goto LetThereBeLight
  18.     )
  19.  
  20. REM checking time
  21. SET hour=%time:~0,2%
  22. SET minute=%time:~3,2%
  23.  
  24. REM getting day of week
  25. for /f %%a in ('wmic path win32_localtime get dayofweek /format:list ^| findstr "="') do (set %%a)
  26.  
  27. REM conditions for profiles
  28. REM set dusk profile between 17:00 and 19:59
  29. IF %hour% GEQ 17 IF %hour% LSS 20 ( SET prSet=%prDusk% )
  30. REM set night profile between 20:00 and 6:59
  31. IF %hour% GEQ 20 ( SET prSet=%prNight% )
  32. IF %hour% LSS 7 ( SET prUstaw=%prNight% )
  33. REM set special profile between 20:00 and 5:59 on weekend nights
  34. IF %dayofweek% GEQ 5 IF %hour% GEQ 20 ( SET prSet=%prSpecjalny% )
  35.  
  36. :LetThereBeLight
  37. REM checking if profile change is needed
  38. IF %currentState%==%prSet% ( GOTO :TheEnd )
  39.  
  40. REM setting profile in registry then running app
  41. reg add "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Gigabyte\AppCenter\ApInfo\RGBFusion" /v Profile /t REG_DWORD /d %prSet% /f
  42. START /B C:\"Program Files (x86)"\GIGABYTE\RGBFusion\RunLed.exe
  43.  
  44. REM try to kill app
  45. timeout 2
  46. taskkill /f /im RGBFusion.exe
  47.  
  48. :TheEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement