User:Mjb/Setting application compatibility mode
From Offset
< User:Mjb
Jump to navigationJump to searchYou can set application compatibility mode for multiple files at once.
To set Windows XP Service Pack 3 mode for all .exe files in a folder:
for %x in ("*.exe") do reg.exe Add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "%~fx" /d "WINXPSP3"
If you want it to be for all users, use HKLM instead of HKCU. If you do that, though, you won't be able to change it in the file Properties > Compatibility dialog.
The /d
value is a space-separated list of values. The first value must be one of:
WIN95
WIN98
WIN4SP5
WIN2000
WINXPSP2
WINXPSP3
VISTARTM
VISTASP1
VISTASP2
WIN7RTM
WINSRV03SP1
WINSRV08SP1
The rest are optional:
256COLOR
640X480
DISABLETHEMES
DISABLEDWM
HIGHDPIAWARE
RUNASADMIN
To unset:
for %x in ("*.exe") do reg.exe Delete "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "%~fx" /f
Leave off the /f
if you want to be prompted for confirmation every time.