Recreating the GitHub Actions Runner service manually on Windows when an upgrade has deleted it. #3642
Unanswered
ColinFinck
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Windows 11 24H2 is one of those Windows upgrades, which (again!) recreates the entire
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
registry key from scratch. This is what happened to me yesterday. As a result, my manually installed GitHub Actions Runner service was gone.Even worse, there is currently no official way to reinstall the GitHub Actions Runner service without reconfiguring it from scratch with new credentials.
I just wanted to get the service up again without reregistering it at GitHub. Therefore, I had to manually reinstall it with
sc
. I'm hereby sharing how I did that:First of all, when Windows recreates the
Services
key, it backs up the old one at least. You can find it atC:\Windows.old\Windows\System32\config\SYSTEM
. Openregedit
, go toHKEY_LOCAL_MACHINE
, and click File -> Load Hive. Then select that file and enter a name for the loaded hive. I called it "sysold". Now you can navigate toHKEY_LOCAL_MACHINE\sysold\ControlSet001\Services
and you should see subkeys starting with actions.runner... These are the service names. Opening one of such keys, you should also findDisplayName
andImagePath
values. We need all of this for thesc
call.Then open a Command Prompt with administrator privileges and enter
<Name>
is the service key name, e.g.actions.runner.mine
<ImagePath>
is the value of theImagePath
value, e.g.C:\actions-runner\bin\RunnerService.exe
<DisplayName>
is the value of theDisplayName
value, e.g.GitHub Actions Runner (mine)
Afterwards, I still needed to adjust the logon user and password. I first checked the "Owner" in the Properties -> Security -> Advanced tab of the
C:\actions-runner\_work
directory. I found out that it was owned by some "runner" user.Then I opened
services.msc
, right-clicked the newly created GitHub Actions Runner service -> Properties -> Log On. I selected "This account" and entered the user name and password of the "runner" user.After confirming everything and closing the dialogs, I was able to start the GitHub Actions Runner service and it worked again.
Beta Was this translation helpful? Give feedback.
All reactions