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

added DominikReichl.KeePass 2.56.0 #137901

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Created using wingetcreate 1.5.7.0
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.5.0.schema.json

PackageIdentifier: DominikReichl.KeePass
PackageVersion: 2.56.0
InstallerLocale: en-US
Platform:
- Windows.Desktop
InstallModes:
- interactive
- silent
- silentWithProgress
UpgradeBehavior: install
FileExtensions:
- kdb
- kdbx
- kpdx
- lngx
- plgx
Installers:
- Architecture: x86
InstallerType: inno
InstallerUrl: https://sourceforge.net/projects/keepass/files/KeePass%202.x/2.56/KeePass-2.56-Setup.exe/download
InstallerSha256: 92529DC0E6449ECA21688601020455505462819217B8E8D51F6E7B1DD05A69EF
InstallerSwitches:
Custom: /ALLUSERS
ProductCode: KeePassPasswordSafe2_is1
Scope: machine
- Architecture: x86
InstallerType: msi
InstallerUrl: https://sourceforge.net/projects/keepass/files/KeePass%202.x/2.56/KeePass-2.56.msi/download
InstallerSha256: AF7C504B2B16F6F664B5154921B7F8AA3F44FA593D90F96F858A66F6A4C3F4BC
ProductCode: '{03F9E7B5-495F-4605-BF59-358B2CA33280}'
Scope: machine
- Architecture: x86
InstallerType: msi
InstallerUrl: https://sourceforge.net/projects/keepass/files/KeePass%202.x/2.56/KeePass-2.56.msi/download
InstallerSha256: AF7C504B2B16F6F664B5154921B7F8AA3F44FA593D90F96F858A66F6A4C3F4BC
InstallerSwitches:
Custom: MSIINSTALLPERUSER=1
ProductCode: '{03F9E7B5-495F-4605-BF59-358B2CA33280}'
Scope: user
Comment on lines +35 to +42
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Architecture: x86
InstallerType: msi
InstallerUrl: https://sourceforge.net/projects/keepass/files/KeePass%202.x/2.56/KeePass-2.56.msi/download
InstallerSha256: AF7C504B2B16F6F664B5154921B7F8AA3F44FA593D90F96F858A66F6A4C3F4BC
InstallerSwitches:
Custom: MSIINSTALLPERUSER=1
ProductCode: '{03F9E7B5-495F-4605-BF59-358B2CA33280}'
Scope: user

The user scope does not work as expected here. There's an issue with many MSIs that install to %LOCALAPPDATA% for user scope, but still put their registry entries to HKEY_LOCAL_MACHINE instead of HKEY_CURRENT_USER, making WinGet think that it's a machine scope install.

A user may get the "user" scope installation for the first time when installing with WinGet, but WinGet will mark the current installation as "machine" scope. This means, for subsequent upgrades through winget upgrade, the user will end up getting the "machine" scope installation resulting in a dual installation of KeePass (both user and machine scope).

Related to

I would suggest removing this installer node entirely to prevent such cases of dual installations in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the above issue, and the resolution appears to be removing user scope installs. User scope installs provide a valuable feature to install updates without requiring permission elevation. Is there a suggestion on how to correct the manifest or msi to address this issue without removing the user scope install?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that it's a useful feature, but unfortunately the only users actually getting the user scope install would be those that don't have an existing installation of KeePass and are using WinGet to install this package. Even then, the users planning to upgrade this package through winget would get the "machine" scope install when they try to upgrade, leaving side-by-side installations on their machine.

See -

video.mp4
  1. winget detects the current 'user' scope installation as 'machine' scope
  2. User upgrading get the machine scope install that requires elevation
  3. If the user does proceed with the install, user is left with a side-by-side installation, becoming another source of confusion

image

Is there a suggestion on how to correct the manifest or msi to address this issue without removing the user scope install?

Unless there is a resolution from WinGet's side (tracked in linked issue above) to handle these situations better, or MSIs start putting the registry entries in the correct place, I don't know of a better solution than just removing the user scope from the manifest.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technical users can still retain the user scope install if they want by passing the args to the installer on update:

winget upgrade DominikReichl.KeePass --custom "MSIINSTALLPERUSER=1"

But the manifest should exhibit a behavior that causes the least issues for majority users.

Copy link
Contributor Author

@mluckam mluckam Feb 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MSIs start putting the registry entries in the correct place

Is this problem MSIs as a whole or misuse per MSI. If this issue could be corrected in the KeePass MSI, I can reach out to the maintainer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading the linked issue, and reviewing many MSIs PRs, I'm under the impression this is a problem with MSIs (or WiX - a popular toolset to create MSIs?) as a whole. I've yet to encounter an MSI package that does this correctly.

ManifestType: installer
ManifestVersion: 1.5.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Created using wingetcreate 1.5.7.0
# yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.5.0.schema.json

PackageIdentifier: DominikReichl.KeePass
PackageVersion: 2.56.0
PackageLocale: en-US
Publisher: Dominik Reichl
PublisherUrl: https://keepass.info
PublisherSupportUrl: https://sourceforge.net/p/keepass/bugs
PrivacyUrl: https://keepass.info/help/base/terms.html#privacy
Author: Dominik Reichl
PackageName: KeePass
PackageUrl: https://keepass.info
License: GNU GPLv2
LicenseUrl: https://keepass.info/help/v2/license.html
Copyright: Copyright © 2003-2023 Dominik Reichl.
CopyrightUrl: https://keepass.info/help/base/terms.html#copy
ShortDescription: KeePass, the free, open source, light-weight and easy-to-use password manager.
Description: |-
KeePass Password Safe is a free, open source, lightweight, and easy-to-use password manager for Windows, Linux and Mac OS X, with ports for Android, iPhone/iPad and other mobile devices.
With so many passwords to remember and the need to vary passwords to protect your valuable data, it’s nice to have KeePass to manage your passwords in a secure way.
KeePass puts all your passwords in a highly encrypted database and locks them with one master key or a key file.
As a result, you only have to remember one single master password or select the key file to unlock the whole database.
And the databases are encrypted using the best and most secure encryption algorithms currently known, AES and Twofish.
See our features page for details.
Moniker: keepass
Tags:
- credentials
- cross-platform
- foss
- password
- password-manager
- password-safe
- protect
ManifestType: defaultLocale
ManifestVersion: 1.5.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Created using wingetcreate 1.5.7.0
# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.5.0.schema.json

PackageIdentifier: DominikReichl.KeePass
PackageVersion: 2.56.0
DefaultLocale: en-US
ManifestType: version
ManifestVersion: 1.5.0