farmcontrol-ui/packaging/windows/grant-users-access.nsh
Tom Butcher add206457f
Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit
Add user access permissions for Windows installer</message>
<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.
2026-08-03 00:45:53 +01:00

13 lines
627 B
NSIS

; 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