2

I need a program that would drag the value of the text size slider in Win 10 settings to 100% (or some other parametrized value).

Settings

There are some methods described i.e. here: Change windows dpi setting C#. But restart is needed to apply a registry change. I am looking for a script that changes Win 10 DPI without restart.

I expect to accomplish this in C# or PowerShell preferably without any big linked external libraries. Is that possible?

Vojtěch Dohnal
  • 7,867
  • 3
  • 43
  • 105
  • May I ask why would you need that? May be we could think of other ways as well.. – Akshay Nov 21 '17 at 13:03
  • @Sak Some remote viewer programs do not work well with DPI higher than 100%. – Vojtěch Dohnal Nov 21 '17 at 13:14
  • 1
    Answer to your question is here: https://stackoverflow.com/questions/35233182/how-can-i-change-windows-10-display-scaling-programmatically-using-c-sharp – FCin Nov 21 '17 at 15:01
  • 3
    Possible duplicate of [How can I change Windows 10 Display Scaling Programmatically using C#](https://stackoverflow.com/questions/35233182/how-can-i-change-windows-10-display-scaling-programmatically-using-c-sharp) – magicandre1981 Nov 21 '17 at 16:10
  • The main problem is that the solution posted in that linked question does not work. I will eventually edit or delete this question but I am still unsure how Creators update affects the problem. – Vojtěch Dohnal Nov 27 '17 at 08:21

1 Answers1

0

(Edited due to a typing error) PowerShell. Make sure to set the execution policy.

#Load ntuser.dat
reg load HKU\UserProfile C:\users\UserProfile \NTUSER.DAT

# Create a new key, close the handle, and trigger collection
Set-ItemProperty -Path 'Registry::HKU\UserProfile\Control Panel\Desktop' -Name 'DPIScalingVer' -Value 60

#Unload ntuser.dat
reg unload HKU\UserProfile 
  • Returns `Set-ItemProperty : Cannot find path 'HKU\UserProfile \Control Panel\Desktop' because it does not exist.` There are possibly extra spaces in the string. Perhaps also some explanation why this should work would be handy. – Vojtěch Dohnal Apr 05 '18 at 06:32
  • Even after executing `PowerShell.exe -ExecutionPolicy UnRestricted -File .\install\test.ps1` and deleting extra spaces it says `Set-ItemProperty : Cannot find path 'HKU\UserProfile\Control Panel\Desktop' because it does not exist` – Vojtěch Dohnal Apr 05 '18 at 06:39
  • Have you tried going into regedit and verifying you have the registry key? I have the Key in my version on Win10. Also, I noticed a typing error in my PowerShell. I accidentally added a space after UserProfile. Did you delete that space? – Malcolm Lamboy Apr 06 '18 at 14:13