Q105971:Converting a Regular GUID to a Compressed GUID

Quote from: 

http://flexerasoftware.force.com/articles/en_US/INFO/Q105971

Synopsis

 

The Windows Installer service places information in the registry that has to do with my product, but I do not recognize the GUID-like keys that appear.

Discussion

In some cases (such as the location of the Uninstall string), MSI stores information about your project using your full Product Code GUID. In most cases, however, most GUID-specific MSI information is stored using a compressed GUID format. In this compressed format, all of the hexadecimal digits in the GUID are the same, but their order is switched around and extraneous characters (hyphens and curly braces) are omitted.

Here is the typical GUID format:

{ABCDEFGH-1234-IJKL-5678-MNPQRSTUVWXY}

The following steps are taken to convert this GUID to its compressed counterpart:

  1. The first group of eight hexadecimal digits are placed in reverse order:
    ABCDEFGH becomes HGFEDCBA
  2. The same is done with the second group of four hexadecimal digits:
    1234 becomes 4321
  3. The same is done with the third group of four hexadecimal digits:
    IJKL becomes LKJI
  4. In the fourth group of four hexadecimal digits, every two digits switch places:
    5678 becomes 6587
  5. In the last group of 12 hexadecimal digits, again every two digits switch places:
    MNPQRSTUVWXY becomes NMQPSRUTWVYX
  6. Finally, the hyphens and curly braces are dropped:
    {ABCDEFGH-1234-IJKL-5678-MNPQRSTUVWXY} becomes
    {HGFEDCBA-4321-LKJI-6587-NMQPSRUTWVYX} becomes
    HGFEDCBA4321LKJI6587NMQPSRUTWVYX
原文地址:https://www.cnblogs.com/cindy-hu-23/p/3545418.html