Change OpenRGB profile on unlock

I have a computer, which my son uses primarly for gaming. I also use it for gaming, when it is available (as of right now, when he has gone to bed). The computer is pimped out with RGB. I got tired of Asus Armoury Crate every now and then maxing the CPU causing the fans to make too much noice, so I replaced it with OpenRGB.

OpenRGB is started automagically when either of us logs in, and sets our own profile. The problem was when we switched between users the last logged in users profile would be the active one.

A combination of a VB script and a scheduled task solves this problem. Create a color profile in OpenRGB and save it with a good name (preferably without spaces).

As an example, create C:\OpenRGB.vb with the following contents:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.CurrentDirectory = "C:\Program Files\OpenRGB\"
WshShell.Run "OpenRGB.exe --profile ""my-openrgb-profile""", 0, false

Then create a scheduled task that is trigger on workstation unlock and runs the C:\OpenRGB.vb script, something like:
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2023-01-13T21:39:19.3700162</Date>
<Author>COMPUTER\User Name</Author>
<URI>\OpenRGB</URI>
</RegistrationInfo>
<Triggers>
<SessionStateChangeTrigger>
<Enabled>true</Enabled>
<StateChange>SessionUnlock</StateChange>
<UserId>COMPUTER\User Name</UserId>
</SessionStateChangeTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>S-1-5-21-775115785-2816134056-1390457888-1001</UserId>
<LogonType>InteractiveToken</LogonType>
<RunLevel>LeastPrivilege</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>C:\OpenRGB.vbs</Command>
</Exec>
</Actions>
</Task>

Now I just need QMK to finish their new client protocol XAP, and for OpenRGB to implement support for that protocol so it also can control the RGB lightning on the keyboard.

I really hate Windows (Unable to start Group Policy Client)

I’m sitting and installing updates on my girlfriends Windows 7 laptop. After the installation is finished and the computer restarts the first time; enter blue screen of death. Fair enough, it is what windows does. I restart it a second time and it boots without problem, except that it is not possible to login with any user that does not have administrator privileges. I spend the whole evening trying to find a solution for the problem, without any initial success.

Gave it another shot the day after, searching for solutions, and I actually found one! I’d say it looks a bit magical, but it works. However, it says a lot about windows and specially the windows register!

  1. Open regedit
  2. Find HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services. This path must contain a key with the name gpsvc, in my case it was intact, but double check that it truly exist. If it does not exist, you might get some guidance here [batcmd.com]
  3. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Svchost, this is the most important path since it must contain the keys and values in step 2.
  4. Make sure that the key above has a multi-string key that is named GPSvcGroup where the value is GPSvc
  5. Make sure that the key in step 3 has a sub-key named GPSvcGroup
  6. This key should have two DWORD (32-bit) values:
  • AuthenticationCapabilities with the value 0x00003020 (12320 decimal)
  • CoInitializeSecurityParam with the value 1

When above steps are finished, just reboot the computer and hopefully you’ll be able to login with non-administrator users again.

A big thank you to SQL-ER [microsoft.com] on the Windows 7 technet forum [microsoft.com] that provided the fix.