Windows runner with non-admin user

Hello, is there any easy way to change to unprivileged user on Windows runner? Looking into GitHub Actions docs I wasn’t able to find out anything.

Do you use self-hosted runner or GitHub hosted runner?

Hosted Windows virtual machines are configured to run as administrators with User Account Control (UAC) disabled. If you use self-hosted runner, when you configure the runner , use an non-admin user when configure it run as service. 

Would you mind telling the reason why you need to use non-admin user? 

We use hosted virtual machines. Related discussion is at Contributor/dev usually uses Windows standard setup (which is IMHO UAC enabled, non-admin account) and for those we have found out current test suite is broken. It was fixed manually for now. Anyway it would be great to ensure we will not re-introduce any similar problem in the future.

There is no method to use windows runner as a non-admin user . If it is suitable for you to run your job in docker container, you could add option: --user 1001  under container keyword. 

For detail info, please refer to a previous ticket: 

+1 for easily running as a non-admin user. This makes it difficult to run PostgreSQL as a subprocess, since it checks whether the account is an admin. See for an example failure.