0

I want to adjust the Display scaling settings of a remote virtual machine via Citrix:

enter image description here

(picture from another computer)

but I get the error message:

enter image description here

ms-settings:display
This file does not have an app associated with it for performing this action. Please install an app or, if one is already installed, create an association in the Default Apps Settings page.

Question: Is there is a way to adjust these settings in PowerShell without admin rights?

Vomit IT - Chunky Mess Style
  • 40,038
  • 27
  • 84
  • 117
Foad
  • 546
  • 3
  • 10
  • 36
  • https://stackoverflow.com/questions/10365394/change-windows-font-size-dpi-in-powershell – Narzard Jul 13 '23 at 11:35
  • @Narzard I have already tried several solutions on that page. They either do not work or require admin rights. – Foad Jul 13 '23 at 12:01

1 Answers1

0

Similar to the Is it possible to change display scaling via command line? answer on that post, this is a PowerShell equivalent that seems to works from Windows 10.

The example below will set the screen from 150% back to 100% in that case and works. Depending on your starting and ending scales, you will need to adjust the TAB # and UP/DOWN # accordingly.

Regarding the error when running ms-settings:display perhaps passing that to explorer as per the PowerShell below will work otherwise here are a couple resources to help you iron this out.

Please note that if the machine you connect to via Citrix has policies set and this is restricted per some policy configuration, you may not be allowed to change those settings. I know RDP does not allow you to change scaling via RDP so there could be an equivalent Citrix reason this cannot occur and thus this may be why the server admins could have put such a restriction in place, so it's probably worth asking them about this too.

PowerShell

explorer ms-settings:display;
Start-Sleep -Seconds 2;
$WshShell = New-Object -ComObject WScript.Shell;
Start-Sleep -Milliseconds 500;
$WshShell.SendKeys("{TAB 2}{UP 5}");
Start-Sleep -Milliseconds 500;
$WshShell.SendKeys("%{F4}");

Supporting Resources

Vomit IT - Chunky Mess Style
  • 40,038
  • 27
  • 84
  • 117
  • @Foad This relies on the Display settings being opened though so if your non-admin credentials can open and adjust that, this is how it's possible emulating opening the screen and clicking the applicable settings. But like I said, the Citrix server admins may have put a restriction on that machine to prevent people from making those changes as in Citrix, could potentially have a negative impact for example (I'm guessing here) so this may explain why that error is coming up on the server per their explicit restriction. Test this on a non-Citrix machine with admin though, it work via PowerShell. – Vomit IT - Chunky Mess Style Jul 13 '23 at 17:16
  • 1
    thanks a lot. I am gonna try it and let you know if it works or not. But I was OK with cmd/batch solutions as well. I just assumed that it only can be done on PowerShell. – Foad Jul 14 '23 at 05:15
  • @Foad Perfect! Keep me posted, I'm interested in hearing final result and/or conclusion for your task in this particular case. Anytime I get a chance to PowerShell modernize something, I enjoy that regardless though. Good luck!! – Vomit IT - Chunky Mess Style Jul 14 '23 at 17:31
  • I tried it. the `explorer ms-settings:display` tries to open the same Window that doesn't work. – Foad Jul 17 '23 at 11:10
  • 1
    @Foad.... In your case, then I think the other things are relevant I posted which may prevent that from working. I'd start by asking the Citrix admins in your environment first but if that's you then try to fix the association with `ms-setting:` options per those other links I provided or perhaps this one: https://www.thewindowsclub.com/ms-settingsdisplay-this-file-does-not-have-an-app-associated-with-it-for-performing-this-action but googling "ms settings not associated" and read over some posts and consider taking actions others state fix this issue if it's supposed to your in Citrix. – Vomit IT - Chunky Mess Style Jul 18 '23 at 11:18