Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match product version of notepad++.exe with release version #14010

Closed
AScott-WWF opened this issue Aug 16, 2023 · 3 comments
Closed

Match product version of notepad++.exe with release version #14010

AScott-WWF opened this issue Aug 16, 2023 · 3 comments
Assignees
Labels

Comments

@AScott-WWF
Copy link

Description of the Issue

Each new version of Notepad++ has (IMHO) the wrong Product version, which makes it difficult to use software deployment tools to accurately detect the version installed (so we currently have to rely on using the last modified date) e.g.
for the latest release 8.5.6 the product version of c:\Program Files\Notepad++\notepad++.exe is 8.56 (file version is correct 8.5.6.0)
image

Steps to Reproduce the Issue

  1. Check the Product version of c:\Program Files\Notepad++\notepad++.exe

Expected Behavior

Product version should match each version release

Actual Behavior

There is a missing decimal place between the last two digits (e.g. 8.56 should be 8.5.6)

Debug Information

Notepad++ v8.5.6 (64-bit)
Build time : Aug 15 2023 - 15:29:28
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : ON
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 21H2
OS Build : 19044.3324
Current ANSI codepage : 1252
Plugins :
mimeTools (2.9)
NppConverter (4.5)
NppExport (0.4)

The product version detection does not work properly for Notepad++ between version upgrades from a software deployment tool (such as Intune or SCCM) as if this change is made in a subsequent 8.x release such as 8.5.7 this will be detected as less than 8.56 (not greater than), So I understand it may be best to make this change in the next Notepad++ major release (e.g. v9.0.0 - As 9.0.0 is greater than 8.56)

Thanks in advance

@rdipardo
Copy link
Contributor

This was requested before in #11431, #11886 and probably elsewhere.

The maintainer's rejection of the idea sounds non-negotiable to me.

@mpheath
Copy link
Contributor

mpheath commented Aug 16, 2023

Related: #13842

Powershell testing with 2 Notepad++ executables in the current directory

$files = 'notepad++_854.exe', 'notepad++_856.exe'
$result = @()

foreach ($file in $files) {
    "$file"

    $ver = (Get-ChildItem -Path $file).VersionInfo.FileVersionRaw
    "FileVersion: $ver"
    $ver

    $ver = (Get-ChildItem -Path $file).VersionInfo.ProductVersionRaw
    "ProductVersion: $ver"
    $ver

    $result += $ver
}

"{1} > {0}" -f $result
$result[1] -gt $result[0]

Outputs

notepad++_854.exe
FileVersion: 8.5.4.0

Major  Minor  Build  Revision
-----  -----  -----  --------
8      5      4      0
ProductVersion: 8.5.4.0
8      5      4      0
notepad++_856.exe
FileVersion: 8.5.6.0
8      5      6      0
ProductVersion: 8.5.6.0
8      5      6      0
8.5.6.0 > 8.5.4.0
True

Notepad++ versioning seems ok to me.

@AScott-WWF
Copy link
Author

Sadly there is a flaw in your code, Most detection mechanisms work with the ProductVersion sub-attribute (not ProductVersionRaw)

Try:

$files = 'notepad++_854.exe', 'notepad++_856.exe'
$result = @()

foreach ($file in $files) {
    "$file"

    $ver = (Get-ChildItem -Path $file).VersionInfo.FileVersion
    "FileVersion: $ver"
    $ver

    $ver = (Get-ChildItem -Path $file).VersionInfo.ProductVersion
    "ProductVersion: $ver"
    $ver

    $result += $ver
}

"{1} > {0}" -f $result
$result[1] -gt $result[0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants