Inno Setup - How to give one specific user rights to a folder

前端 未结 1 1107
傲寒
傲寒 2020-12-18 16:59

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         


        
相关标签:
1条回答
  • 2020-12-18 17:32

    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
    
    0 讨论(0)
提交回复
热议问题