Permissions error with Gitlab Runner as Windows Service

Hi, I’m running Gitlab Runner on Windows 7 in VirtualBox.

Running C:\gitlab-runner\> gitlab-runner.exe run in CMD.exe works fine, but when running as a Windows service my job output is:

Running with gitlab-runner 10.3.0 (5cf5e19a)
  on vm01 (35ea5d35)
Using Shell executor...
ERROR: Job failed (system failure): open C:\Windows\TEMP\build_script268133134\script.cmd: Access is denied.

The Gitlab service does not have write access to C:\Windows\TEMP. Changing the permissions of Windows TEMP is not recommended, and gets reset on reboot anyway.

Is the directory gitlab runner uses for script.cmd configurable at all? Does it just use %TEMP%?

Does the Gitlab Runner Windows Service run as Administrator?

Sorry if this is more of a Windows question than a Gitlab question, but I am not much of a Windows expert, and I am stumped.

I figured out my own question, just needed to create a separate Windows user for the service. Not really a Gitlab issue, just my unfamiliarity with Windows.

I have gitlab runners running on my machine as a service but even though it appears to go through the build process no files are generated so it errors at the link process. I also believe this is a permissions thing.

How doI create a separate windows user for the service as you did?

only open CMD ==> run is administration