Archive: create a dir where all users have full control


create a dir where all users have full control
Hi all,

I need to create in my INSTDIR a subdir where all users have full control. So this would mean that by default I would create a C:\Program Files\MyApp\myDir and because it's in Program Files most probably the restrictive users wouldn't have access in that directory.
It's like I would create the directory and later I would run cacls.exe.

Is there a way to specify "Allow full control to everyone" when creating a directory?

Thx,
Viv


You can use the AccessControl plug-in.


It's not a good idea to create such a dir within "c:\program files\". There may be some policy/tool that restores those privileges to read-only (e.g. company installation).

On newer Windows versions you can use the "All Users" profile.


Hi,

i want to use the AccessControl plugin, but the doc lacks information (maybe only for a noob like me):

_ When you put rights on a folder, is it recursive on all sub-folders and sub-files ?

_ I had to look at source code to know which permissions were available. Does those permissions are compliant with other language OS ?

_ I want to use generic user "Everyone" but in a french Windows OS the user is "Tout le monde". Is there a unic SID for this user (i have not been able to find an answer on google) or do i have to detect OS language before and set the correct user name ?

Thanks to "Everyone" ^^


  1. A quick and easy test should be able tell if it's recursive or not.
  2. The permissions are translated from text to numeric identifiers. There are no translation problems with those.
  3. A quick Google search of the example SID in the readme plus the word "everyone" came up with (S-1-1).

Thx Kichik !

1. I tested it meanwhile and i now confirm recursivity ^^
2. Good to know.
3. With more search i found S-1-1-0 ! i ll give a try without -0. I even tried the code below to find the SID of user Everyone and it gave me S-1-1-0


System::Call 'advapi32::LookupAccountNameW(w "${SERVER_NAME}",w "${USERNAME}",i R8, \
*i ${NSIS_MAX_STRLEN}, w .R1, *i ${NSIS_MAX_STRLEN}, *i .r0)i .r1'
System::Call 'advapi32::ConvertSidToStringSid(i R8,*t .R1)i .r0'


Thanks for the answer even i know i could have found by myself with more search (i m confused...)

Edit : S-1-1 doesn't seem to work...