Change “Windows font size (DPI)” in PowerShell?

后端 未结 7 2006
别那么骄傲
别那么骄傲 2020-12-08 17:20

I\'m using a laptop at office (Windows 7) with a station and double screen and at home without station.

The point is I have to change text size each time I switch fr

7条回答
  •  抹茶落季
    2020-12-08 18:04

    Sorry, I misread the question. I thought you wanted to control the PowerShell windows.

    As already mentioned you could set the LogPixels setting in the registry, to see what the current setting is, try this:

    Get-Item -Path Registry::'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontDPI' | Select-Object -ExpandProperty Property
    

    If the LogPixels key is there it will show, you can create it if it does not exist:

    Set-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontDPI\LogPixels'
    

    NB: You have to run this with privileges that allow you to manipulate the registry.

    There is a good introduction to this over at TechNet.

提交回复
热议问题