I want to give folder rights to one specific user (not user groups). I have seen multiple examples but it give rights to whole user group.
[Dirs]
Name: \"{ap
I must say that I find this quite suspicious. Users should not have write permissions to application installation folder. If the application needs to store some data, it should write them to a user profile folder (C:\Users\username\AppData
) or to a common data folder (C:\ProgramData
).
See also Application does not work when installed with Inno Setup.
Anyway, Inno Setup does not support granting permissions to a user. I actually assume, it's because there's no real good use case for that (as explained above).
But you can use Windows icacls or cacls commands from [Run] section instead.
[Run]
Filename: "icacls"; Parameters: """{app}"" /grant John:w"; Flags: runhidden
[Run]
Filename: "cacls"; Parameters: """{app}"" /e /g John:w"; Flags: runhidden