My usecase
Some of my RGB devices require OpenRGB to be run with elevated privileges. This is where I started running into some problems:
Existing methods
Running OpenRGB as a Windows Service
While this works, there are some problems with it:
- Applying profiles at startup can be a pain and sometimes doesn’t work for no reason
- Restarting OpenRGB is more annoying
- Still forces you to run a user instance of OpenRGB to change anything
- The Service runs as the SYSTEM user which
- Is a terrible security practice
- Breaks some other RGB connections which get initialized later in the boot process
Setting the Shortcut to run as Administrator
Also technically works but shows you a UAC prompt on every startup which is incredibly annoying.
The fix
Creating a Windows Task Scheduler Task that runs on login works perfectly, here’s how to do it:
Warning
This guide assumes you are using the installer version of OpenRGB. If you are using the portable version, change your paths accordingly
Instructions
- Start OpenRGB with administrative rights and set up your devices
- Click
Save Profileand choose a name. I useddefault
Run this code snippet in an elevated (admin) PowerShell window:
| |
Info
If you prefer not running random code you found on the Internet, here’s how to do it manually
- Open Windows Task Scheduler (
taskschd.msc) - Under
ActionsclickCreate Basic Task - Under
NameenterOpenRGB - Set the
TriggertoWhen I log on - Set the
ActiontoStart a Program - Under
Program/ScriptenterC:\Program Files\OpenRGB\OpenRGB.exe - Under
Add Argumentsenter--gui --startminimized --profile default.orp(replacedefaultwith your profile name if you went with another one) - Under
Start inenter `%APPDATA%\OpenRGB - Select
Open the Properties dialog for this task when I click Finish - Check
Run with highest privileges - Under
Configure forselectWindows 10 - On the
Conditionstab uncheckStart the Task only if the computer is on AC power - On the
Settingstab uncheckStop the task if it runs longer than: x days - Click
OK
Now OpenRGB will run with the needed permissions and be right there in your TaskBar in case you need it :)