简体   繁体   中英

Inno Setup- make sure that directory is NOT readonly?

I have an Inno Setup installer which copies some files into Program Files , the [Files] section is set up like this:

[Files]
Source: "Bundled_Files\*"; DestDir: "{commonpf64}\StudioLinked\Romplur\"; Flags: ignoreversion recursesubdirs createallsubdirs; Permissions: users-full;

The files copied from inside Bundled_Files always end up being set to read-only. I've set the permissions to users-full but that doesn't seem to change anything. Is there a way to ensure that files are made NOT read-only?

I tried adding an additional [Dirs] section before the [Files] section like so:

[Dirs]
Name: "{commonpf64}\StudioLinked\Romplur\"; Permissions: users-full;

But this also didn't change the read-only setting on the folders.

Using Inno Setup 6.2.1 on Windows 10. Any help appreciated!

I use the following code to make a subdirectory of my installation directory writable and editable:

[Dirs]
Name: "{app}\MyWritableSubDir"; Permissions: users-modify

However, you should store only data files in any writable directory or sub-directory of "C:\Program Files", never executables: Otherwise this opens a security hole (there is a reason why "C:\Program Files" is read-only for normal users.).

The correct place to store application specific data, as intended by Microsoft, is either the ProgramData directory or the AppData directory. See Where is the correct place to store my application specific data? for a more general discussion.

See https://jrsoftware.org/ishelp/index.php?topic=consts how to use these directories in Inno Setup.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM