tag:help.appveyor.com,2012-11-13:/discussions/questions/1888-running-tests-with-reduced-privilegesAppVeyor: Discussion 2018-10-19T08:17:35Ztag:help.appveyor.com,2012-11-13:Comment/384560792015-11-13T17:28:17Z2015-11-13T17:28:17ZRunning tests with reduced privileges<div><p>There is no built-in support for running with reduced
privileges.</p>
<p>I've found psexec.exe could be used for that: <a href="http://www.techsupportalert.com/content/easy-ways-run-windows-programs-restricted-rights.htm">
http://www.techsupportalert.com/content/easy-ways-run-windows-progr...</a></p>
<p>It's actually available on build workers in C:\Tools\PsTools and
should be in PATH already.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/384560792015-11-13T22:03:25Z2015-11-13T22:03:26ZRunning tests with reduced privileges<div><p>Thank you for answer.</p>
<p>Tried psexec, it had another problem -- limited too much, now
testcases that must succeed to open file, fail :)</p>
<p>Anyway, managed to circumvent 'runas /trustlevel:0x20000' error
level problem: google test runner generates junit XML output that
can be queried for failures with powershell.</p></div>Sventag:help.appveyor.com,2012-11-13:Comment/384560792017-08-02T04:43:15Z2017-08-02T04:43:16ZRunning tests with reduced privileges<div><p>Maybe someone else will find this useful, so I'll leave it here.<br>
I tried many different ways including psexec and runas, nothing worked actually.</p>
<p>Finally I found quite complicated way of doing that (using openssh). But at least it works well and allows you to control the privileges like you need. Besides, it requires zero configuration from Appveyor side. The example can be found here <a href="https://github.com/yandex-qatools/postgresql-embedded">https://github.com/yandex-qatools/postgresql-embedded</a>.</p></div>Ilia