I've to support a legacy application, originally created for Windows NT 4 (32-bit), but still running fine under Windows 10 (64-bit), provided all of the compatibility settings are done. The problem is that these have to be done mostly by hand.
I'm trying to figure out how to build a program or script that I could deliver for that purpose. I already know that the compatibility settings are stored in the registry under HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
or HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
respectively (depending whether the settings are applied to all or just a single user), by adding values whose names are the application paths like for instance
C:\Program Files (x86)\SomeApp\SomeBinary.exe
adding contents like (for enabling compatibility to Windows XP Service Pack 3)
WINXPSP3
as observed on Windows 7, or
~ WINXPSP3
as observed on Windows 8.1 (and Windows 8)
What I want to understand before shipping such a tool is:
What is the purpose or meaning of the tilde sign starting the value contents?
I'm searching for it for months (Google, Bing) but by now, I found nothing but questions. There's only a guess that it as well could be meaningless(?):
But most suggestions about adjusting compatibility settings seem to take much care of this magic char:
Note that there is a space between the tilde and the HIGHDPIAWARE.
Is there anybody who really knows something about it?
Best Answer
I was looking into this same thing and found this (emphasis mine):
Source: the article Registry Table (Windows) in the Installer Database Reference
So it appears that the tilde character just appends or prepends string values.