6
2
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
Alter registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video\{A8405CA4-B9D8-4123-B809-D912D3B666DC}\0000
result: none and after Jenkins connects, it sets the keys VidPNSource0Width & Height back to 1024x768
Any ideas?
Edit: VM hardware settings
Is there any Video card connected?. What cable you are using VGA/HDMI/DVI?. – Renju Chandran chingath – 2014-10-06T16:34:29.143
No, its a virtual machine. No cables. – Ondrej Sotolar – 2014-10-07T05:41:55.217
Oh sorry. My bad. I misread VMWare vcentrum. – Renju Chandran chingath – 2014-10-07T12:07:33.663