Set permissions using a batch file after user input

I want my batch file to enter data from the user and grant Full Control permissions to a specific folder (the path was hardcoded) to the set of users entered by the user. The user enters a comma-separated list of usernames in the form (domain \ username). Please help me!!!!!!!!!!: (

+3
source share
1 answer

In Windows XP, you can use the following command

cacls C:\GNUPG /T /E /G everyone:F

If the username is passed as the first parameter to the batch file, use the following command

cacls C:\GNUPG /T /E /G %1:F

In the above parameter, "C: \ GNUPG" is the path name

+2
source

Source: https://habr.com/ru/post/1791189/


All Articles