fix(installer): support non-admin Windows installation mode

Description

Support non-admin Windows installation mode:

  • Replace HKLM/HKEY_LOCAL_MACHINE with HKA (HKEY_AUTO) registry root
  • Add IsAdminInstallMode check to NeedsAddPath function
  • Create separate registry entries for admin and non-admin install modes
  • Use proper registry paths based on installation privileges
  • Format code with 2-space indentation following Pascal conventions

This allows Windows users to install glab without administrator privileges using the /CURRENTUSER option. Previously, the installer failed with access denied error (code 5) when trying to write to HKEY_LOCAL_MACHINE in non-admin mode.

Resolves #8067 (closed)

How has this been tested?

Downloaded windows_installer Job artifact glab__Windows_x86_64_installer.exe and installed it with the following options corresponding to winget ones:

glab__Windows_x86_64_installer.exe /SP- /SILENT /SUPPRESSMSGBOXES /NORESTART /CURRENTUSER

The installation succeeded, the user-specific Path environment variable was updated. The glab cli was found when run from the command-line.

Screenshots (if appropriate):

Merge request reports

Loading