I need to set (default) screen resolution to Win Server 2012 hosted in VMWare vcentrum 5.5.0. It is a dedicated server for running automatic GUI tests for Windows applications by Jenkins. When connected from Jenkins, it has the screen resolution of 1024x768. I need higher, at least 1024px height.
What i tried so far:
Run setres.exe from Jenkins
c:\windows\system32\setres.exe -w 1280 -h 1024
result: The settings passed in could not be applied to the graphics device.
Add the following lines to the vmx file
svga.autodetect = "FALSE" svga.vramSize = "20971520" svga.maxWidth = "1920" svga.maxHeight = "1080"
result: setres.exe -i still returns 1024x768
Use Win API functions: ChangeDisplaySettings, EnumDisplaySettings
I wrote a C# utility which worked correctly on WS2003 (run from Jenkins) & Win7 (run locally), but on WS2012 run from Jenkins EnumDisplaySettings returns:
Supported Modes: 1024 by 768, 32 bit, 60 hertz 1280 by 1024, 32 bit, 60 hertz 1920 by 1080, 32 bit, 60 hertz ...shortened
However ChangeDisplaySettings returns
-1 : dislplay change failed
result: none and after Jenkins connects, it sets the keys VidPNSource0Width & Height back to 1024x768
Edit: VM hardware settings