[Request] Add a [Dirs] flag to set permissions only if directory was newly created

33 views
Skip to first unread message

M P

unread,
Jul 23, 2024, 4:30:14 PM (4 days ago) Jul 23
to innosetup
Hi.

I'm not sure if it is here we can submit ideas for new features, but here it goes.

I was struggling to find why my setup was stuck on step "creating folders" but I managed to figure it out: my application directory on Windows' "ProgramData" may grow to a rather large size. When using [Dirs] to create folders, apparently it was going over all the files in that directory setting permissions again.

The problem occurs when running an update on that instance.
I need to guarantee some permissions when creating the folder, but after that, when running updates to my application, I'd rather ignore the permission check and assume it's still correct.

It would be great if there was some flag that could be passed, such as:

[Dirs]
Name: "C:\ProgramData\MyOrg\MyApp\{code:instanceName}"; Permissions: users-modify; Flags: setaclonlyifnew

So it would set the permissions only if the directory didn't exist and was just created.

I'm aware I can write some code to check that, this is only my idea to make things easier.

Thanks!

Gavin Lambert

unread,
Jul 24, 2024, 7:37:00 PM (3 days ago) Jul 24
to innosetup
On Wednesday, July 24, 2024 at 8:30:14 AM UTC+12 M P wrote:
I was struggling to find why my setup was stuck on step "creating folders" but I managed to figure it out: my application directory on Windows' "ProgramData" may grow to a rather large size. When using [Dirs] to create folders, apparently it was going over all the files in that directory setting permissions again.

Does your data actually need to be shared between all users on the same machine?  If not, you can use the per-user AppData folder instead, which would not require permissions changes.

Otherwise currently I believe the only way to do what you want is with a Check function.
Reply all
Reply to author
Forward
0 new messages