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)
as observed on Windows 7, or
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(?):
When compatibility mode is set via Properties, Windoze places a tilde (~) followed by a space before the value, e.g. "~ WINXPSP3". Yet it seems to work (or not work as the case may be) regardless of the tilde.
But most suggestions about adjusting compatibility settings seem to take much care of this magic char:
Is there anybody who really knows something about it?