Add user access permissions for Windows installer</message>
Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit

<message>
- Introduced a new macro in `grant-users-access.nsh` to grant standard users read and execute access to the installation directory, addressing permission issues that affect non-admin users.
- Updated `installer.nsh` and `scripts/installer.nsh` to include the new macro during the installation process, ensuring proper access rights are set for the install tree.
This commit is contained in:
Tom Butcher 2026-08-03 00:45:53 +01:00
parent cc3846397a
commit add206457f
4 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,12 @@
; Grant standard (non-admin) users read/execute on the install tree.
; Elevated installs into Program Files often create admin-only ACLs, which
; breaks launcher.exe and bun reading deeplink.js for normal users.
!macro grantUsersInstallAccess
Push $0
DetailPrint "Granting standard users read and execute access to $INSTDIR"
ExecWait '"$SYSDIR\icacls.exe" "$INSTDIR" /inheritance:e /T /C' $0
DetailPrint "Enabled inherited permissions (exit code: $0)"
ExecWait '"$SYSDIR\icacls.exe" "$INSTDIR" /grant *S-1-5-32-545:(OI)(CI)RX /T /C' $0
DetailPrint "Granted Users read/execute (exit code: $0)"
Pop $0
!macroend

View File

@ -75,7 +75,11 @@
RMDir "$SMPROGRAMS\Farm Control"
!macroend
!include "grant-users-access.nsh"
!macro customInstall
!insertmacro grantUsersInstallAccess
DetailPrint "Register farmcontrol URI Handler"
DeleteRegKey HKCR "farmcontrol"
WriteRegStr HKCR "farmcontrol" "" "URL:farmcontrol"

View File

@ -24,7 +24,6 @@
<Property Id="ARPPRODUCTICON" Value="InstallerIcon" />
<Property Id="DISABLEADVTSHORTCUTS" Value="1" />
<Property Id="MSIINSTALLPERUSER" Value="1" />
<Property Id="PREVIOUS_UNINSTALL_CMD">
<RegistrySearch

View File

@ -1,4 +1,8 @@
!include "packaging\windows\grant-users-access.nsh"
!macro customInstall
!insertmacro grantUsersInstallAccess
DetailPrint "Register farmcontrol URI Handler"
DeleteRegKey HKCR "farmcontrol"
WriteRegStr HKCR "farmcontrol" "" "URL:farmcontrol"