I'm working on a custom settings script for Windows that will automate specific settings I want on a new Windows machine or installation. I grant access to some folders using cacls
in my script, but I am prompted with the Y/N
prompt for each listed item. I would like to bypass this by automatically saying "yes" for each folder or file I specify. I am aware of the risks with this and have had no issues thus far. Here is an example of one such directory in my script:
cacls "%PROGRAMFILES%\WindowsApps" /grant Administrators:f