Please see the documentation in upstream Chromium.
This Windows-specific service is registered for system level installs. There are two ways a system level install can be done:
- UAC prompt raised during Brave install (ex: person has admin privs) and person clicks
Yes
to accept escalation. - Brave installer executable is invoked with
--system-level
argument in command line which has admin privs.
Currently, the elevation service is only used to install the Brave VPN
services once the browser detects the product was purchased.
The service executable is inside the versioned folder of Brave. It's possible to debug the service interactively by using the following procedure:
- Open
regedit.exe
- Navigate to
[HKEY_CLASSES_ROOT\AppID\{5693E62D-00D6-4421-AFE8-58F3C947436A}]
(or if building another channel, check here to find the right AppID). - Delete the
LocalService
value (should be set to something likeBraveDevelopmentElevationService
) and create a new String value calledRunAs
with the data value set toInteractive User
. - Open an admin
cmd.exe
instance. - Navigate to the path where you built the elevation service executable (ex:
C:\brave\src\out\Component
). - Launch the exe via
elevation_service.exe --console
. - After debugging, don't forget to undo step 3.
These steps will let you run a locally compiled version of elevation service. This is very helpful for debugging or tracing the logic there.