farmcontrol-ui/scripts/installer.nsh
Tom Butcher 9bd581ee03
Some checks reported errors
farmcontrol/farmcontrol-ui/pipeline/head Something is wrong with the build of this commit
Refactor Windows installer and scripts to enhance user access and installation behavior
- Updated `package.json` to change installation scope from `perMachine` to `perUser`, allowing installations for standard users without admin rights.
- Modified `farmcontrol.nsi` to adjust installation directory and registry keys to use `HKCU` instead of `HKLM`, improving accessibility for non-admin users.
- Refined `installer.nsh` and related scripts to ensure proper handling of the farmcontrol URI handler and shortcuts, aligning with the new user access model.
- Removed references to the `grant-users-access.nsh` script, as user access permissions are now managed directly within the installer.
2026-08-03 01:17:00 +01:00

11 lines
618 B
NSIS

!macro customInstall
DetailPrint "Register farmcontrol URI Handler"
DeleteRegKey HKCU "Software\Classes\farmcontrol"
WriteRegStr HKCU "Software\Classes\farmcontrol" "" "URL:farmcontrol"
WriteRegStr HKCU "Software\Classes\farmcontrol" "URL Protocol" ""
WriteRegStr HKCU "Software\Classes\farmcontrol\DefaultIcon" "" "$INSTDIR\${APP_EXECUTABLE_FILENAME}"
WriteRegStr HKCU "Software\Classes\farmcontrol\shell" "" ""
WriteRegStr HKCU "Software\Classes\farmcontrol\shell\Open" "" ""
WriteRegStr HKCU "Software\Classes\farmcontrol\shell\Open\command" "" "$INSTDIR\${APP_EXECUTABLE_FILENAME} %1"
!macroend