Screen Resolution sets the screen resolution on Windows virtual machines (VMs). This tool is useful for UI automated testing when the default resolution is not at the desired resolution.
Installation of this package will do the following:
- Create a local user account to Remote Desktop Protocol (RDP) at specified screen resolution (default is 1920x1080) into another user account on same virtual machine
- Enable Remote Desktop connections
- Bypass Identity Of The Remote Computer Verification
- Allow TCP Port 3389 used by Windows Remote Desktop Protocol (RDP) in Windows Firewall
Tested on Windows Server 2012R2, 2016, 2019 and Windows 10 virtual machines (VMs).
A Vagrantfile to provision a Chrome Selenium-Grid on Windows 10 with screen resolution set to 1366x768 is available. See TESTING.md for more information.
Set screen resolution to 1920x1080 (default) and prompt for password:
choco install -y screen-resolution
Set screen resolution to 1366×768 and provide passwords:
choco install -y screen-resolution --params "'/Width:1366 /Height:768 /Password:redacted /RdpPassword:redacted'"
The following package parameters can be set:
/Password:
- Password of account to RDP into. Prompts for password, when it is not provided./RdpPassword:
- Password of RDP local user account to create. Defaults to Password of account to RDP into, when it is not provided./UserName:
- Username of account to RDP into. Default:$env:UserName
./RdpUserName:
- Username of RDP local user account to create. Default:rdp_local
./RdpGroups:
- RDP group members. Default:@('Administrators', 'Remote Desktop Users')
./Width:
- Display width in pixels. Default:1920
./Height:
- Display height in pixels. Default:1080
.
These parameters can be passed to the installer with the use of
--params
. For example: --params "'/Password:redacted'"
.
To automatically set Screen Resolution on server startup, you need
to install package
autologon. Then run
autologon <RdpUserName> <RdpDomain> <RdpPassword>
once to set it up.
choco install -y autologon
autologon rdp_local $env:userdomain redacted
Non-Windows Servers, e.g., Windows 10, require package rdpwrapper to be installed. No additional configuration is required after install.
choco install -y rdpwrapper