- Newest
- Most votes
- Most comments
The issue you're experiencing with the screen resolution not persisting across sessions in AppStream 2.0 is a common one. Unfortunately, there's no out-of-the-box solution to make the screen resolution setting persist, but there are a few workarounds you can try:
-
Use a PowerShell Script:
-
Instead of relying on the built-in "Enable application settings persistence" feature, you can create a custom PowerShell script to set the screen resolution.
-
Create a PowerShell script (e.g.,
set-resolution.ps1
) with the following content:$width = 1920 $height = 1080 $settings = Get-DisplaySettings $settings.Width = $width $settings.Height = $height Set-DisplaySettings -InputObject $settings
-
Upload this script to an S3 bucket and reference it in the "User Session Scripts" section of your AppStream 2.0 Stack configuration.
-
Make sure the script is set to run on the "Session Start" event.
-
-
Leverage the Registry:
-
Another approach is to use the registry to set the screen resolution. This can be more reliable than the PowerShell script method.
-
Create a registry file (e.g.,
set-resolution.reg
) with the following content:Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Control Panel\Desktop] "LogPixels"=dword:00000060 "ScreenSizeX"=dword:00000780 "ScreenSizeY"=dword:000003c0
-
The values for "ScreenSizeX" and "ScreenSizeY" correspond to 1920 and 1080, respectively.
-
Upload this registry file to an S3 bucket and reference it in the "User Session Scripts" section of your AppStream 2.0 Stack configuration.
-
Make sure the registry file is set to run on the "Session Start" event.
-
-
Use a Batch File:
-
As an alternative to PowerShell, you can create a batch file (e.g.,
set-resolution.bat
) with the following content:reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSizeX /t REG_DWORD /d 1920 /f reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSizeY /t REG_DWORD /d 1080 /f RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters
-
Upload this batch file to an S3 bucket and reference it in the "User Session Scripts" section of your AppStream 2.0 Stack configuration.
-
Make sure the batch file is set to run on the "Session Start" event.
-
Whichever method you choose, the key is to set the screen resolution programmatically during the session start, rather than relying on the user to manually change the settings. This will ensure that the resolution is set consistently across all sessions.
Remember to test the scripts thoroughly and make sure they work as expected in your AppStream 2.0 environment before deploying them to production.
Relevant content
- asked 8 months ago
- asked 3 years ago
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 5 months ago