[issue20984] 'Add/Remove Programs' dialog missing entries for 32-bit CPython 'current user only' installations on 64-bit Windows

Jurko Gospodnetić report at bugs.python.org
Thu Mar 20 02:44:28 CET 2014


Jurko Gospodnetić added the comment:

Here are some more Windows Installer notes taken down
when originally researching this issue on my end.
Hopefully they can be of some use to anyone researching
the issue further:

- each installation gets a GUID key identifying it

- the installation GUID key can be converted into a
  corresponding product key using the following
  algorithm:

def guid_to_product_key(guid):
    """guid = string in format {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"""
    parts = guid.lstrip("{").rstrip("}").split("-")
    key = []
    # Reverse the first 3 parts.
    for p in range(3):
        key.extend(reversed(parts[p]))
    # Swap character pairs in remaining parts.
    for part in parts[3:]:
        for i in range(len(part) // 2):
            key.append(part[2 * i + 1])
            key.append(part[2 * i])
    return "".join(key).upper()

- some Windows Installer registry keys related to a
  specific installation:

  Example installation GUID key:
    {a37f2d73-72d1-364d-ba5d-cea430bcc040}
  Example product key:
    37D2F73A1D27D463ABD5EC4A03CB0C04
  Installed for example user with SID:
    S-1-5-21-2100645858-3408510361-1554613642-1000

  HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\{a37f2d73-72d1-364d-ba5d-cea430bcc040}
  HKEY_CURRENT_USER\Software\Microsoft\Installer\Products\37D2F73A1D27D463ABD5EC4A03CB0C04
  HKEY_CURRENT_USER\Software\Microsoft\Installer\Features\37D2F73A1D27D463ABD5EC4A03CB0C04

  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-21-2100645858-3408510361-1554613642-1000
\Products\37D2F73A1D27D463ABD5EC4A03CB0C04
  HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{A37F2D73-72D1-364D-BA5D-CEA430BCC040}

  Product key listed under several different subkeys under:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-21-2100645858-3408510361-1554613642-1000\Components

  Product key listed under:
    HKEY_CURRENT_USER\Software\Microsoft\Installer\UpgradeCodes\84ED6E56853AD434AAF4A47FD24B17F8
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UpgradeCodes\84ED6E56853AD434AAF4A47FD24B17F8

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20984>
_______________________________________


More information about the Python-bugs-list mailing list