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

Trouble upgrading notepad++ using winget #10277

Closed
scadden365 opened this issue Jul 27, 2021 · 5 comments
Closed

Trouble upgrading notepad++ using winget #10277

scadden365 opened this issue Jul 27, 2021 · 5 comments
Labels

Comments

@scadden365
Copy link

Description of the Issue

I want to use winget to upgrade notepad++. There is a problem, if notepad++ is open when the winget command is run, it doesn't upgrade, but winget reports that it has upgraded successfully.

Steps to Reproduce the Issue

  1. open notepad++
  2. run "winget upgrade notepad++" from windows terminal
    Output
    Found Notepad++ [Notepad++.Notepad++]
    This application is licensed to you by its owner.
    Microsoft is not responsible for, nor does it grant any licences to, third-party packages.
    Downloading https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.1.2/npp.8.1.2.Installer.x64.exe
    Successfully verified installer hash
    Starting package install...
    Successfully installed

Expected Behavior

For notepad++ installer to have alerted that the application was open, and to ask to close it before the installation continues.
This is the functionality with WinSCP

Actual Behavior

It appears to be installed, and running : "winget list notepad++"
Name Id Version
Notepad++ Notepad++.Notepad++ 8.1.2

Winget thinks the latest version is installed.
But when you check "?" "About Notepad++" , it still shows the old version v8.1.1

Debug Information

See winget ticket: microsoft/winget-pkgs#22514

@OfficialEsco
Copy link

Again, this is false blaming. This has nothing to do with WinGet.
The issue is with the Silent Install, if you run the Notepad++ installer in interactive mode it will show this message
image
If you run the Notepad++ installer in silent mode it will not display any message and exit with code 0, since it exists with code 0 it will "successfully" install Notepad++, however the program itself is not updated, but the registry strings are so it displays as it updated.

You can replicate this by having Notepad++ 8.1.1 installed and then having Notepad++ open while executing the 8.1.2 installer in silent mode.

The difference between the Notepad++ and WinSCP installer is that WinSCP is Inno while Notepad++ is NSIS.

@mere-human
Copy link
Contributor

Related: #8514

@scadden365
Copy link
Author

Related: #10189

@donho donho added the reject label Jul 30, 2021
@donho
Copy link
Member

donho commented Jul 30, 2021

Notepad++ is not in Windows Store. The one on Windows store IS NOT Notepad++ official release.

@donho donho closed this as completed Jul 30, 2021
@OfficialEsco
Copy link

Hes not talking about the unofficial Windows Store version, the winget-pkgs repo just contain installers (exe's, appxbundle, msix etc)
Anyways this is a duplicate of #10189 as scadden365 said

donho pushed a commit that referenced this issue Oct 27, 2023
When Notepad++ installer with the '/S' optional param is used while a previously installed Notepad++ instance is running, it does not update the locked main 'notepad++.exe' binary, but the installer still reports success (exit code == 0, regkeys actualized according to the installer version used...).

Moreover - because the installation/upgrade then looks like it is done, some automatic update services like winget cannot be used until a next N++ version is released (winget erroneously reports that the current version is already installed...).

The fix consist to set error code and quit installer, when installer in silent mode, and there's an instance of Notepad++ open.

Fix #10189, fix #10277, fix #22514, fix #14236, fix partially #8514, close #14251
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants