Administrative/Global installs
BinToss opened this issue · comments
Edge Deflector's installer only allows per-user installs right now.
To support all-user administrative installs, the install script would need to dynamically change the default values of several variables. Namely, InstallDir
and InstallDirRegKey
. The former to start with NSIS' $PROGRAMFILES
variable and the latter to default to use HKLM
instead of HKCU
.
- Determine if installer is elevated. An elevated process isn't always run by the local Administrator account. I recommend using UACHelper.
- If installer is elevated, modify default values of
InstallDir
andInstallDirRegKey
.
Context
The EdgeDeflector Chocolatey package has stopped updating at Edge Deflector 1.1.3.0.
Chocolatey packages are typically installed to Program Files and HKLM. The NSIS installer of Edge Deflector 1.2.2.0 only allows per-user installs as implied by the registry key paths in the installer script.
Global installs will be unsupported for the foreseeable future. It was the only option in earlier versions, but you still need to perform some manual steps after the installation. These steps must be made per-user and by the user because of the default program setting protections in Windows. Antivirus vendors also flag the installer as malicious as soon as it starts requesting elevated privileges. Microsoft recommends per-user installs these days anyway.