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