tag:help.appveyor.com,2012-11-13:/discussions/problems/33322-how-to-change-screen-resolution-in-byoc-setup-on-local-windowsAppVeyor: Discussion 2022-10-03T18:02:22Ztag:help.appveyor.com,2012-11-13:Comment/559391022022-10-02T21:08:25Z2022-10-03T15:13:37ZHow to change screen resolution in BYOC setup on local Windows<div><p>I've been experimenting with a BYOC setup. But I'm struggling to change the screen resolution of the AppVeyor Agent to anything other than 1024x768. I need this for my Selenium tests, which fail un such low resolutions.</p>
<p>I did NOT experience this issue before in the regular AppVeyor environments (non-BYOC), where this Powershell script is capable of changing the resolution just fine:<br>
<a href="https://github.com/appveyor/ci/blob/master/scripts/set-screenresolution.ps1">https://github.com/appveyor/ci/blob/master/scripts/set-screenresolu...</a></p>
<p>Unfortunately, this script doesn't work with the local AppVeyort agent. All I'm getting is "Unable To Process Your Request. Sorry For This Inconvenience" when it runs as part of an AppVeyor build on my own BYOC. The error code is -1. If I run the Powershell script myself on the same machine, it does change the resolution successfully. My hunch is there is a rights issue, but it's really hard to figure out where to look. Any ideas on what could cause this?</p></div>Christiaantag:help.appveyor.com,2012-11-13:Comment/559391022022-10-03T02:04:29Z2022-10-03T15:13:37ZHow to change screen resolution in BYOC setup on local Windows<div><p>So, is it "Process" type of cloud, right? If so, see what user account is used to run AppVeyor Host Agent (<code>appveyor</code> by default). If you are saying you can run the script and it changes the resolution then you can configure host agent windows service to use your account instead. Hope that helps.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/559391022022-10-03T14:35:32Z2022-10-03T15:13:37ZHow to change screen resolution in BYOC setup on local Windows<div><p>Hi Feodor,</p>
<p>Thanks for responding so quickly!<br>
Yes, it is a "process" cloud indeed.</p>
<p>I tried setting the Appveyor Host Agent to my own (admin) account as you<br>
suggested. It doesn't seem to make a difference, unfortunately,<br>
When I make screenshots during the Selenium run after failed tests, it<br>
shows a 1024x768 resolution. On the regular AppVeyor cloud, the resolution<br>
is correctly increased<br>
I'm not sure how to move forward. Is there a way for me to access the<br>
locally-running process when it's running its tests?</p>
<p><em>Vriendelijke groet / best wishes</em></p>
<p><em>Christiaan Verwijs</em> Captain Curly | +31(0)624950109</p>
<p>Read our latest writing on Medium <a href="http://bit.ly/2CdRdad">http://bit.ly/2CdRdad</a><br>
Check out upcoming workshops, classes & free meetups <a href="http://bit.ly/2FO0i9n">http://bit.ly/2FO0i9n</a><br>
Visit us at the theliberators.com<br>
<a href="http://bit.ly/2CdRdad">http://bit.ly/2CdRdad</a></p></div>Christiaan Verwijstag:help.appveyor.com,2012-11-13:Comment/559391022022-10-03T15:17:55Z2022-10-03T15:17:55ZHow to change screen resolution in BYOC setup on local Windows<div><p>I think I know what's going on. As Host Agent is running as a windows service it doesn't have an access to a desktop. Inside AppVeyor cloud VMs build agent is running in interactive mode with an access to a desktop.</p>
<p>Try running host agent as a program from a command line. Stop AppVeyor Host Agent windows service then run <code>C:\Program Files\AppVeyor\HostAgent\appveyor-host-agent.exe</code> from command line. Let me know if that worked.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/559391022022-10-03T17:44:55Z2022-10-03T17:44:56ZHow to change screen resolution in BYOC setup on local Windows<div><p>That works! Wow, thanks. Great support Feodor. Resetting the screen resolution now works and my Selenium test battery also passes on the BYOC local cloud. That's wonderful!</p>
<p>I also tried to check the "Allow service to interact with the desktop" box for the Windows Service. But that didn't work, probably because it uses a Local System Account and not an elevated account.</p>
<p>Do you know if there is a way to allow this while running as a Windows Service? I can imagine that that is more convenient for others also? I'm happy this workaround works though</p></div>Christiaantag:help.appveyor.com,2012-11-13:Comment/559391022022-10-03T17:48:46Z2022-10-03T17:48:46ZHow to change screen resolution in BYOC setup on local Windows<div><p>We've never been able to make "Allow service to interact with the desktop" work.<br>
Current solution is to run Host Agent or Build Agent with "Run" section in the Registry.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/559391022022-10-03T18:02:17Z2022-10-03T18:02:21ZHow to change screen resolution in BYOC setup on local Windows<div><p>That works too. Thanks again</p></div>Christiaan