coco_vc
17th March 2006 18:15 UTC
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
kichik
17th March 2006 19:54 UTC
You can use the AccessControl plug-in.
stb
20th March 2006 07:38 UTC
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.
fluidz91
6th November 2006 11:35 UTC
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" ^^
kichik
6th November 2006 20:59 UTC
- A quick and easy test should be able tell if it's recursive or not.
- The permissions are translated from text to numeric identifiers. There are no translation problems with those.
- A quick Google search of the example SID in the readme plus the word "everyone" came up with (S-1-1).
fluidz91
7th November 2006 09:48 UTC
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...