Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing windows files permissions by code
Message
From
22/11/2006 06:55:45
 
 
To
21/11/2006 16:06:44
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
01171171
Message ID:
01171700
Views:
11
This message has been marked as the solution to the initial question of the thread.
Good tip.

If WSH is allowed, one can use that for the use of CACLS. The advantage is that, as compared to using RUN, the appearance of the dos-window can be suppressed with the 3rd parameter.
oShell = createobject("WScript.Shell")
lcRun = "CACLS file.txt /P JIM:F < yes.txt"
lnRC = oShell.Run(lcRun, 1, .T.)
>What about using CACLS.EXE since that is present on any machine running winnt 4 or above.
>
>>>True. However, it is more than nothing. What do you additionally suggest?
>>
>>I thought of SetFileSecurity but I don't have ready out of the box code for that one.
>>Cetin
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform