I'm not sure how to do it with declares, but if passing it off to a shell is ok for your project take a look at the cacls command. attrib is pretty much worthless in XP, there mostly for archiving tools and the occasional script that would freak if it didn't find it. cacls is the command to read and alter the access control list. I don't have a good example at hand, but they're fairly easy to find. I should note that this is only present on NT4, 2k, XP, and I'd assume 2k3. I have no idea about Vista, but I'd bet that it would be an order of magnitude greater in the PITA department.
On a different note, if you're running into this limitation you may want to step back and seriously study the way your application works. Obviously some apps might legitimately require fairly deep access, but does this one? If it is a user level application, maybe take advantage of the profile structure. If you need to share certain files amongst all users on a machine, utilize the Shared Documents folder. Good luck, Fargo Dr Gerard Hammond wrote: > Hi, > > Does anybody know how to change a Win32 file's permissions via RB code. > I need to modify a file so that the Security tab has the "Full > Control" checkbox ticked for *ALL USERS* > > using the shell I tried > > attrib -r thefilepath > > but that didn't work. > > Logging in as an administrator and doing it via the Properties panel > works but my users struggle with this level of detail. > > _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
