I am using Windows Server 2012 r2 Datacentre edition running on an Azure virtual machine and I have come across a strange behaviour that hopefully someone can help me understand.

Put simply, when I use AutoLogon to ensure that a desktop exists for a particular user after restart, the desktop size appears to always be 1024x768 - I have attempted to change this using a multitude of routes including code but whichever way I change the resolution the method/api call/powershell cmdlet always appears to succeed but then on subsequent queries it's back to 1024x768. I first though that this was some default imposed by Windows when there is no display driver but after writing an app that enumerates supported display modes it returns a lot more supported resolutions. What's more bizarre is that if I use a remote desktop tool and set the resolution to something like 1920x1080 then the desktop is resized and even after the remote session is finished, queries for the desktop size now return the new resolution of 1920x1080... until the VM restarts.

I have spent a while now researching this phenomena to no avail - manually changing every instance of 1024 and 768 in the registry doesn't no anything either.

Does anyone have any idea how I would change the default desktop size for a user when there is no display device and where this 1024x768 "magic" resolution comes from?

EDIT: Thanks for the answers so far and although I appreciate them I am already pretty certain that this isn't going to be resolved with a simple reg hack or startup tool (mainly because I've already tried them) - I am pretty sure the problems lies in the fact that there is a display driver (Hyper-V Video) but no display device


  • are we talking about rdp here? – mzhaase Sep 16 '16 at 8:21
  • not really... it's actually the size of the desktop before rdp - after an rdp session has started then all bets are off and you have a known resolution – Scott Perham Sep 16 '16 at 8:22
  • What is it that you actually want to accomplish? Set a default resolution for RDP server side? – mzhaase Sep 16 '16 at 8:25
  • I would like to set the "screen resolution" for a user that is logged on automatically without rdp – Scott Perham Sep 16 '16 at 8:26
  • Have you tried to do Set-DisplayResolution in the login script of the user? – mzhaase Sep 16 '16 at 8:32

You can run regedit.exe on your Server in an cmd and search for that registry entries.

To change the resolution, you need to look under \Video and find the right display GUID and then modify the resolution values:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video\" & sDisplayGUID & "\0000\DefaultSettings.XResolution

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video\" & sDisplayGUID & "\0000\DefaultSettings.YResolution

Hope that helps you.

  • When you say "find the right display GUID".... there is no display device – Scott Perham Sep 16 '16 at 8:33
  • Hey sry about that, but which powershell scripts or commands u have used already? Maybe this one can help you: C:\> Set-DisplayResolution -Width 1920 -Height 1200 -Force – P to B Sep 16 '16 at 8:40
  • Tried it... again, it seems to succeed but then Get-WmiObject -Class Win32_DesktopMonitor | Select-Object ScreenWidth,ScreenHeight returns 1024x768 again – Scott Perham Sep 16 '16 at 8:42
  • Here is an Link to an identical question from the social.msdn.microsoft.com website social.msdn.microsoft.com/Forums/azure/en-US/… – P to B Sep 16 '16 at 8:49
  • Didn't work :( ... interestingly though I do have two Guids under which there is "0000" - I set the keys in one of them (which didn't work even though after a restart the values have persisted), the other one tells me I don't have permissions to set a value (regit as admin running from the admin account) – Scott Perham Sep 16 '16 at 9:36

Since you are already using AutoLogon, there is an old program called "resswitch" that will change resolution on logon.


It is ancient and I don't remember using it since XP days. There is an alternative called "displaychanger" (http://12noon.com/?page_id=80) that is free for education but otherwise not.

  • Thanks, I will give it a go but I don't hold out much hope considering all this tool does is call EnumDisplaySettings and then ChangeDisplaySettings - both of which I have already tried... EnumDisplaySettings returns good values but ChangeDisplaySettings does nothing – Scott Perham Sep 16 '16 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.