da2x / EdgeDeflector

A tiny helper application to force Windows 10 to use your preferred web browser instead of ignoring the setting to promote Microsoft Edge. Only runs for a microsecond when needed.

Home Page:https://www.ctrl.blog/entry/edgedeflector-default-browser.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 and InstallDirRegKey.

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.