Inno Setup - How to set permissions of installation folder

Marian Pavel

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 user doesn't have the permission of modify the installation folder.

I managed to set permissions of files:

[Files]
Source: "D:\....\***.jar"; DestDir: "{app}"; Flags: ignoreversion; Permissions: users-full
Source: "D:\....\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;\
    Permissions: users-full

But that doesn't help because I need full users permission on installation folder, for example: C:\Program Files\InstallationFolder

Martin Prikryl

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).

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Inno Setup refuses to set permissions of some files

From Dev

How to delete a nonempty folder in inno setup

From Dev

Canceling an installation in Inno Setup

From Dev

How to get permissions to a folder in an installation process?

From Dev

How to change folder permissions during package installation

From Dev

How to test if FileExists in folder where Inno Setup is running?

From Dev

How to disable OK button in "Browse For Folder" dialog in Inno Setup

From Dev

How to set the future permissions of content in folder

From Dev

How to set a global environment variable from Inno Setup installer?

From Dev

How to set Launch program according to components selected in Inno Setup?

From Dev

How to set inno setup script parameters from final builder?

From Dev

Inno setup compiler How to set launching image during app loading

From Dev

How to set inno setup script parameters from final builder?

From Dev

PowerShell To Set Folder Permissions

From Dev

Inno Setup Set TInputQueryWizardPage Height

From Dev

Set permissions of the installation directory

From Dev

Inno Setup: How to let Folder.CopyHere finish copying before moving to the next folder?

From Dev

Inno Setup: pack folder with all subfolders

From Dev

Inno Setup: Delete folder with Task function

From Dev

Inno Setup - Get a path to parent folder

From Dev

Creating shortcut in startup folder using Inno setup

From Dev

Inno Setup shortcuts for folder are not opening in Windows 10

From Dev

Inno setup executes [UninstallRun] during installation followup

From Dev

Inno setup: detect installation based on product code

From Dev

Sign all exe files on Inno Setup Installation

From Dev

Stop InstallShield installation when Inno Setup is detected

From Dev

Inno setup: detect installation based on product code

From Dev

How do I set permissions on a network-shared folder?

From Dev

How to set folder permissions for a particular container on Elastic Beanstalk

Related Related

  1. 1

    Inno Setup refuses to set permissions of some files

  2. 2

    How to delete a nonempty folder in inno setup

  3. 3

    Canceling an installation in Inno Setup

  4. 4

    How to get permissions to a folder in an installation process?

  5. 5

    How to change folder permissions during package installation

  6. 6

    How to test if FileExists in folder where Inno Setup is running?

  7. 7

    How to disable OK button in "Browse For Folder" dialog in Inno Setup

  8. 8

    How to set the future permissions of content in folder

  9. 9

    How to set a global environment variable from Inno Setup installer?

  10. 10

    How to set Launch program according to components selected in Inno Setup?

  11. 11

    How to set inno setup script parameters from final builder?

  12. 12

    Inno setup compiler How to set launching image during app loading

  13. 13

    How to set inno setup script parameters from final builder?

  14. 14

    PowerShell To Set Folder Permissions

  15. 15

    Inno Setup Set TInputQueryWizardPage Height

  16. 16

    Set permissions of the installation directory

  17. 17

    Inno Setup: How to let Folder.CopyHere finish copying before moving to the next folder?

  18. 18

    Inno Setup: pack folder with all subfolders

  19. 19

    Inno Setup: Delete folder with Task function

  20. 20

    Inno Setup - Get a path to parent folder

  21. 21

    Creating shortcut in startup folder using Inno setup

  22. 22

    Inno Setup shortcuts for folder are not opening in Windows 10

  23. 23

    Inno setup executes [UninstallRun] during installation followup

  24. 24

    Inno setup: detect installation based on product code

  25. 25

    Sign all exe files on Inno Setup Installation

  26. 26

    Stop InstallShield installation when Inno Setup is detected

  27. 27

    Inno setup: detect installation based on product code

  28. 28

    How do I set permissions on a network-shared folder?

  29. 29

    How to set folder permissions for a particular container on Elastic Beanstalk

HotTag

Archive