Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set yourpath=YOUR PATH
- call :enableSecurity "%yourpath%"
- echo;
- echo;Finished
- set /p ".=Press Anything to Exit.."<nul
- pause>nul&exit
- :enableSecurity <Path>
- pushd %~1
- for /f "tokens=* delims=" %%i in ('dir /b /ad') do (
- icacls "%%~i" /grant :r Everyone:^(M^) /deny Everyone:^(DE^) /inheritance:r >nul 2>&1 && (
- echo;[SUCCESS] "%~1\%%~i"
- ) || (
- echo;[ERROR] "%~1\%%~i" (Please Contact The Administrator..ho sorry it's you...well...)
- )
- )
- popd
- Exit /b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement