anchor.diff:    Vcl.Dialogs,
     Vcl.Forms,
     Winapi.Windows,
  +  System.Classes,
  +  System.SysUtils,
     System.Win.Registry,
  -  System.SysUtils,
   
     GetOsVersion,
     Keyman.System.Security,
  
positive.code: procedure InitialiseRegistrySecurity;
  var
    r: TRegistry;
  begin
    r := TRegistry.Create;
    try
      if r.OpenKey(SRegKey_KeymanRoot_CU, True) then
      begin
        GrantPermissionToAllApplicationPackages(r.CurrentKey, KEY_READ);
        // #1680 - on some systems, HKCU\Software\Keyman\Keyman Engine is not
        // inheriting permissions from HKCU\Software\Keyman
        if r.OpenKey('\' + SRegKey_KeymanEngineRoot_CU, True) then
          GrantPermissionToAllApplicationPackages(r.CurrentKey, KEY_READ);
      end;
    finally
      r.Free;
    end;
  
negative.code: (*
    Name:             main
    Copyright:        Copyright (C) SIL International.
    Documentation:
    Description:
    Create Date:      1 Aug 2006
  
    Modified Date:    25 Oct 2016
    Authors:          mcdurdin
    Related Files:
    Dependencies:
  
    Bugs:
    Todo:
    Notes:
    History:          01 Aug 2006 - mcdurdin - Initial version
                      02 Aug 2006 - mcdurdin - Timeout when Beta expires
                      04 Dec 2006 - mcdurdin - Block Keyman loading if KM5/6 running
  