LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set all users write permission on a folder

Greetings,
 
I have an application which creates a Data folder in the root directory of the C drive on installation and subfolders inside that folder when it first starts up.  It is installed on Windows XP or Vista using an administrator account.  However, I need all of the users on that computer to be able to read and write to the Data folder and its subfolders.  The default folder permissions when created are read-only for other users.
 
I have tried using the Set Permissions VI, but although I am setting all permissions (b111111111), and subsequent reads of those permissions return the same number, the actual permissions are not affected as far as I can tell by getting the properties of the folder in Windows Explorer.  I have read the help regarding the Set Permissions VI, and it sounds like the only thing it can actually do is set the write permission of the User (not all users), and Windows ignores the rest.
 
Can anyone advise me of the easiest way to set the write permissions for all users for a folder programmatically?  Even running something inside a CIN would be fine if the code was provided here.
 
Thanks much!
 
-Joe
0 Kudos
Message 1 of 3
(3,206 Views)
You could use the Windows API to do that. With Vista it's a different matter alltogether because of the big difference in the way that Vista handles accounts. You may want to take a look at a couple of alternatives that I mentioned in this post.
0 Kudos
Message 2 of 3
(3,200 Views)
Thanks smercurio_fc!  The CACLS solution in your linked post worked perfectly for me for Windows XP, and it turns out that in Vista all Authenticated Users (i.e. everyone but Guest) get modify priviledges by default on (sub)folders which are created by administrators in the root directory, so I don't need to do anything there.
 
This forum rocks.  Smiley Happy
0 Kudos
Message 3 of 3
(3,175 Views)