Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-16454

Implement compatibility modes for Windows 10, Server 2016 and 2019

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Major
    • 0.4.14
    • None

    Description

      Implement ReactOS-specific compatibility modes for the latests Windows 10 (1903), Server 2016 (1709) and 2019 (1809):

      • declare VersionLieInfos and define shims in appcompat;
      • add relevant dropdown menu entries in the accpage shell extension;
      • implement shims itself and VersionLies in sdb;
      • update appshim rostest accordingly;
      • additionally add a few missing newlines between the groups of different compatibility modes.

      Windows 10 1903 has no these modes. The latest mode which it has is "Windows 8":

      All ReactOS shims use the special hex values which are results of calling GetVersion, GetVersionExA and GetVersionExW functions. How I got these values:

      1. Download Microsoft Application Verifier 4.0 from here: https://www.microsoft.com/en-us/download/confirmation.aspx?id=20028 and install it in ReactOS (it needs Microsoft Visual C++ 6 Redistributable from Rapps). This helpful tool allows to apply a lot of lie compatibility settings to exe applications. In particular, it allows to use HighVersionLie without any compatibiltiy modes, which works in more cases, than traditional shims. It saves the settings for each separate app in registry instead of shim database.
      2. Download GetVersion tool: http://www.geocities.ws/jumper/GetVersion.7z. This simple tool gets results of GetVersion, GetVersionExA and GetVersionExW functions. For doing this, just launch GetVersion.exe from the extracted archive.
      3. Launch Application Verififer, click "File" -> "Add application", then browse  GetVersion.exe and click "Open".
      4. After adding it do the program's database, uncheck "Basics" checkbox in the "Tests" groupbox, and expand "Compatibility" checkbox there.
      5. Check "HighVersionLie", right click and "Properties".
      6. Set all values as needed (e. g. Major version, Minor version, Build number etc). I got them from here, for example: https://www.gaijin.at/en/infos/windows-version-numbers.
      7. Click "OK" and then "Save" in the main window.
      8. Click "Exit".

      After doing this, GetVersion tool will show correct hex values of the needed Windows version. I added them into VersionLieInfo declarations, so shims report needed Windows version as they should.

      In Windows 10 for some reason that tool shows incorrect NT 6.2 (Windows 8) values, even without any compatiblity modes, so I decided to get them in ReactOS (using Application Verifier).

      After implementing compatiblity modes, GetVersion returns the correct values, same as before, for each Windows version (10|2016|2019) in the according compatibility mode.

      Although after my changes appeared some warnings during ROS compilation, but the system still compiles successfully and the modes work correctly:

      [Err ][fromXml             ] Data node (SHIMVERSIONNT) without value!
      [Err ][fromXml             ] Data node (SHIMVERSIONNT) without value!
      [Err ][fromXml             ] Data node (SHIMVERSIONNT) without value!
      

      If this problem is on my side (caused by my changes), then I probably need to fix it.

      Attachments

        1. GetVersion_Win2k19_cm.png
          GetVersion_Win2k19_cm.png
          41 kB
        2. GetVersion_Win2k16_cm.png
          GetVersion_Win2k16_cm.png
          41 kB
        3. GetVersion_Win10.png
          GetVersion_Win10.png
          193 kB
        4. GetVersion_Win10_cm.png
          GetVersion_Win10_cm.png
          41 kB
        5. GetVersion_ROS.png
          GetVersion_ROS.png
          38 kB
        6. compatibility_modes_Win10.png
          compatibility_modes_Win10.png
          22 kB
        7. compatibility_modes_ROS_after.png
          compatibility_modes_ROS_after.png
          10 kB

        Activity

          People

            learn_more Mark Jansen
            Oleg Dubinskij Oleg Dubinskiy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: