Friday 5 October 2018

vmware - Set Windows Server 2012 default screen resolution (VM Ware)

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

enter image description here


result: none and after Jenkins connects, it sets the keys VidPNSource0Width & Height back to 1024x768


Any ideas?


Edit: VM hardware settings enter image description here

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...