Update installation fails if installer is not run with admin privileges

Description

Prerequisites:

  • Greenshot is already installed (1.3.154 here, for example)

  • Installation path: C:\Program Files\Greenshot

  • Greenshot is not running.

  • Windows UAC is active (default).

Procedure:

  • Run the installer (here: Greenshot-INSTALLER-1.3.157-UNSTABLE.exe) without explicit admin privileges.

  • Go through the wizard and confirm to start the installation procedure.

Observations:

  • The user is asked for admin privileges by UAC and the uninstaller is executed (separate window). The uninstall process ends successfully.

  • The installer want's to proceed, but an error pops up that the setup could not create C:\Program Files\Greenshot (Error 5: Access denied).

Expected behavior:

  • The installer uses UAC to get the rights for installation into Program Files branch.

Workaround:

  • For an update installation, start the installer with admin privileges right away.

Environment

Windows 10 x64 (1909 as well as 20H2)

Activity

Show:
Eledil
March 21, 2021, 5:17 PM
Edited

Yeah, I prefer installation of (most) programs in the more or less protected Program Files directory branch. I wasn't aware of the default location of Greenshot in a user directory anymore. However, as you've pointed out already, there should be a detection implemented if the destination path needs admin priviliges.

Thanks for diving into it, Robin.

Robin Krom
March 21, 2021, 3:54 PM
Edited

Oh, thanks for reporting this. It does surprise me a bit though, normally the installation is done in the %APPDATALOCAL% if the user doesn’t have admin rights.

I need to check what the installer does in this case… Maybe I changed a flag somewhere, but Greenshot does NOT necessary need admin privileges to install.

Assignee

Unassigned

Reporter

Eledil

Affects versions

Components

None

Priority

Major

Labels