classification
Title: Windows Installer Product does not include micro version in display name
Type: enhancement Stage:
Components: Installation, Windows Versions: Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Damon Atkins, Markus Kramer, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Priority: low Keywords:

Created on 2017-08-02 10:04 by Markus Kramer, last changed 2017-08-05 13:56 by steve.dower.

Files
File name Uploaded Description Edit
3.6.2.png Markus Kramer, 2017-08-02 10:11 Product Version 3.6.2150.0
Messages (11)
msg299651 - (view) Author: Markus Kramer (Markus Kramer) Date: 2017-08-02 10:04
Each Windows installation has a “product version”.

The Windows installer python-3.6.2.exe has product version "3.6.2150.0"  (accessible with context menu / Properties / Details).

This causes at least 2 problems:
 - Automated software inventory relies on product version and therefore does not detect version 3.6.2
 - Microsoft installation guidelines require the first three fields to be smaller than 256.

Proposed alternatives for the value of product version:
- "3.6.2.0" to indicate the final release build.
- "3.6.2.150" to indicate the build number. The build number may be higher than 256, but this is unusual for a final release.



Side note: 
This is a sub-problem of http://bugs.python.org/issue31077
msg299652 - (view) Author: Markus Kramer (Markus Kramer) Date: 2017-08-02 10:11
Screenshot of Product Version 3.6.2150.0
msg299658 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2017-08-02 13:54
Can you link to those guidelines please? Microsoft release plenty of software with version numbers over 256.

Also, since people already rely on the current scheme, we'd need a very compelling reason to break them. I don't believe you've made that case yet.
msg299676 - (view) Author: Eryk Sun (eryksun) * Date: 2017-08-02 22:41
The docs [1] are clear that this property must be of the form major.minor.build. It can include at least one additional field, which the installer ignores. The major and minor version numbers can be up to 255, and the build number can be up to 65535. Python's ProductVersion property complies with this:

    db = msilib.OpenDatabase('core.msi', msilib.MSIDBOPEN_READONLY)
    v = db.OpenView("select * from Property where Property='ProductVersion'")
    v.Execute(None)
    r = v.Fetch()

    >>> r.GetString(2)
    '3.6.2150.0'

It would be unorthodox to use the build version field for Python's micro release version number. I don't see why it's really important since micro releases are ABI compatible for in-place upgrades.

[1]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa370859
msg299715 - (view) Author: Damon Atkins (Damon Atkins) Date: 2017-08-03 16:52
Hi Guys,

The reason I raise the original is for all those configuration management tools which need the version number.

In the uninstall registry is very much an inconsistent.
*Anything with a Display Name in the registry (name in the GUI) will be listed.
* Their are two places for version information.
** 1 "large int (DWORD) version number" called "version" store across several integers in the registry, which supports <0-255>.<0-255>.<0-65535> this is not visible in the GUI.
** display version, which is a string, and can be set to anything, this is visible in the GUI.

"display version" is set most of the time.
"large int version number" not always

"large int (DWORD) version number" I have actual see software which as created this as a text string, which is just wrong. e.g. Google Chrome, however Google Update Helper does the right thing.

People see the "display version" so this needs to match the version of python.  I would expect most configuration management tools to use "display version" before "large int (DWORD) version number"

The following is based on installing python 3.6.2 (3.6.2150 not sure what this means)

display name should be "Python 3.6 (64-bit)" if you wish to encourage  only single version of 3.6 to be installed. or "Python 3.6.2 (64-bit)" if you wish to allow many versions of 3.6 to be installed. "3.6" matches closer to what happens in the unix/linux world (/usr/lib/python2.6).
 
display version string should 3.6.2 or 3.6.2.2150 never 3.6.2150 
"large int (DWORD) version number" should not be set, but you could force it to 3.6.2 given your unlikely to go higher than 255.255.65535 the automatic builds might not like doing this, might be easier not to set it.
msg299716 - (view) Author: Damon Atkins (Damon Atkins) Date: 2017-08-03 17:06
The python 3.5.3 (64-bit) installer currently adds most of the components installed in the "MACHINE" Registry all but 1 item (2 entries)

"python 3.5.3 (64-bit)" software entry which it places in both the 32 bit and also the 64 bit registry.  It should be in the "MACHINE" Registry and only in the 64 bit registry, which is the default for 64 bit installer. 

For example a 32 bit installer would place "python 3.5.3 (32-bit)" only in the 32 bit part of the registry.
msg299717 - (view) Author: Damon Atkins (Damon Atkins) Date: 2017-08-03 17:09
Because this entry "python 3.5.3 (64-bit)" is the USER part of the registry, only the user who installs python can see that it is installed.
msg299721 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2017-08-03 19:12
There's an existing bug for the registration going to the wrong place. It requires changes to the Wix toolset to resolve. No need to conflate it with this issue.

As far as I can tell, the problem here is just the version string displayed in Programs and Features? Correct?
msg299757 - (view) Author: Markus Kramer (Markus Kramer) Date: 2017-08-04 18:29
Steve, yes: from my point of view, the version in "Programs and Features" should be  3.6.2 or 3.6.2.0 or 3.6.2.150. 


Eryk, thank you for your explanation - I had a wrong memory about the third field in ProductVersion to be the micro version and learned something. 


If that would be helpful, I could change the title of this issue.
msg299758 - (view) Author: Damon Atkins (Damon Atkins) Date: 2017-08-04 19:07
To Summaries
A)
Name/DisplayName "Python 3.X (64-bit)" or "Python 3.X.Y" (64-bit) "Python 3.X (64-bit)" would match the install directory which is \Python3X (this should be \Python3.X)

Display Version should start with 3.X.Y or 3.X.Y.<build number>

version DWORD in the registry does not need to be set but if set would need to be 3.X.Y
B) Registry being placed in in the wrong location
HKU\<User-SID>\Software\Microsoft\Windows\CurrentVersion\Uninstall\{GUID}
should be going into
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall

C) Suggest the default install dir is
"c:\Program Files\Python3.6" instead of "c:\Program Files\Python36"
msg299784 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2017-08-05 13:55
This issue is about A.

B has a separate issue. C will not be changed. Please don't bother bringing them up again here, it's just a distraction.
History
Date User Action Args
2017-08-05 13:56:36steve.dowersettitle: Windows Installer Product Version 3.6.2150.0 Offset By 0.0.150.0 -> Windows Installer Product does not include micro version in display name
2017-08-05 13:55:57steve.dowersetpriority: normal -> low
versions: + Python 3.7
messages: + msg299784

components: + Installation
type: behavior -> enhancement
2017-08-04 19:07:06Damon Atkinssetmessages: + msg299758
2017-08-04 18:29:46Markus Kramersetmessages: + msg299757
2017-08-03 19:12:35steve.dowersetmessages: + msg299721
2017-08-03 17:09:39Damon Atkinssetmessages: + msg299717
2017-08-03 17:06:50Damon Atkinssetmessages: + msg299716
2017-08-03 16:52:56Damon Atkinssetmessages: + msg299715
2017-08-02 22:41:48eryksunsetnosy: + eryksun
messages: + msg299676
2017-08-02 13:54:36steve.dowersetmessages: + msg299658
2017-08-02 10:11:17Markus Kramersetfiles: + 3.6.2.png

messages: + msg299652
2017-08-02 10:04:48Markus Kramercreate