Inno Setup - How to set permissions of installation folder

后端 未结 1 760
-上瘾入骨i
-上瘾入骨i 2021-01-06 06:31

I am using Inno Setup to create an installer of my application.

On the first run my application is creating an SQLite database but it can\'t achieve that while the u

相关标签:
1条回答
  • 2021-01-06 07:15

    The Permissions parameter of the [Files] section entry applies to the installed files only, not to the implicitly created directories.

    To change permissions of a folder, use an explicit entry in the [Dirs] section for the {app}:

    [Dirs]
    Name: {app}; Permissions: users-full
    

    Though it is not a good practice.

    • In general, Windows applications shall not require write permissions to their folder. That's against Windows guidelines. The application should write data 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.

    • In your specific case, you better run the database creation process as the Administrator (e.g. using the runascurrentuser flag).
    0 讨论(0)
提交回复
热议问题