Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- pushd %~dp0
- net session >nul 2>&1
- if %errorlevel%==0 (
- goto removal
- ) else (
- goto noadmin
- )
- :noadmin
- echo This script needs to be ran as administrator in order to work.
- goto quit
- :removal
- takeown /f "%homedrive%/$RECYCLE.BIN" /r /d y
- icacls "%homedrive%/$RECYCLE.BIN" /grant everyone:F /t /q
- rmdir /s /q "%homedrive%/$RECYCLE.BIN"
- goto quit
- :quit
- popd
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement