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
As supposed in the other answers, the setting under HKLM is not the correct place as the dpi scaling is a user defined setting. The correct registry key is HKCU:\Control Panel\Desktop with the value LogPixels.
More information about all DPI-related registry settings can be found in DPI-related APIs and registry settings.
I wrote a tiny PowerShell script that changes the DPI scaling depending on the current scaling and performs the user logoff, so I just have to execute the script when I put my device to a different monitor.
cd 'HKCU:\Control Panel\Desktop'
$val = Get-ItemProperty -Path . -Name "LogPixels"
if($val.LogPixels -ne 96)
{
Write-Host 'Change to 100% / 96 dpi'
Set-ItemProperty -Path . -Name LogPixels -Value 96
} else {
Write-Host 'Change to 150% / 144 dpi'
Set-ItemProperty -Path . -Name LogPixels -Value 144
}
logoff;exit