Run build step (Nunit) *without* elevation

Hi,
I have a unit test that launches an executable that behaves differently if the process is elevated. 

When the unit test is launched from TeamCity, the test fails because the build agent is elevated -> Nunit runs elevated -> my executable runs elevated.

The only way to launch the agent without elevation seems to be to start it manually from the command line, but that is not really feasible. If it is run as a service or started from task scheduler it always runs elevated.

How can I get around this? How to run Nunit (or any build step) without elevation?

I'm running TeamCity 2019.1.

Thanks in advance,
Johannes

0
1 comment
Avatar
Nikolay Pianikov

Hi

Try using this TeamCity plugin: https://github.com/JetBrains/teamcity-runas-plugin.
Add the build feature `runAs`, specify user`s credentials and required integrity level, `Medium` for instance.

0

Please sign in to leave a comment.