Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Echo Off
- Color 1A
- Cd %systemroot%\system32
- REM --> Check for permissions
- Reg query "HKU\S-1-5-19\Environment"
- REM --> If error flag set, we do not have admin.
- if %errorlevel% NEQ 0 (
- ECHO **************************************
- ECHO Running Admin shell... Please wait...
- ECHO **************************************
- goto UACPrompt
- ) else ( goto gotAdmin )
- :UACPrompt
- echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
- set params = "%*:"=""
- echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
- "%temp%\getadmin.vbs"
- del "%temp%\getadmin.vbs"
- exit /B
- :gotAdmin
- Cls & Mode CON LINES=11 COLS=104 & Color 0D & Title Created By FreeBooter
- Echo.
- Echo.
- Echo.
- Echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
- Echo º Do You Want To Add Take Ownership to the Right-Click Menu in Windows Explorer (Y/N)? º
- Echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
- Echo.
- Echo.
- Set /p input= RESPONSE:
- If /i Not %input%==Y (Goto :_Ex) Else (Goto :_Start)
- :_Ex
- If /i Not %input%==N (Goto :EOF) Else (Goto :_RegRestore)
- :_Start
- Reg.exe add "HKCR\*\shell\runas" /ve /t REG_SZ /d "Take Ownership" /f > Nul
- Reg.exe add "HKCR\*\shell\runas" /v "NoWorkingDirectory" /t REG_SZ /d "" /f > Nul
- Reg.exe add "HKCR\*\shell\runas\command" /ve /t REG_SZ /d "cmd.exe /c takeown /f \"%%1\" && icacls \"%%1\" /grant administrators:F" /f > Nul
- Reg.exe add "HKCR\*\shell\runas\command" /v "IsolatedCommand" /t REG_SZ /d "cmd.exe /c takeown /f \"%%1\" && icacls \"%%1\" /grant administrators:F" /f > Nul
- Reg.exe add "HKCR\Directory\shell\runas" /ve /t REG_SZ /d "Take Ownership" /f > Nul
- Reg.exe add "HKCR\Directory\shell\runas" /v "NoWorkingDirectory" /t REG_SZ /d "" /f > Nul
- Reg.exe add "HKCR\Directory\shell\runas\command" /ve /t REG_SZ /d "cmd.exe /c takeown /f \"%%1\" /r /d y && icacls \"%%1\" /grant administrators:F /t" /f > Nul
- Reg.exe add "HKCR\Directory\shell\runas\command" /v "IsolatedCommand" /t REG_SZ /d "cmd.exe /c takeown /f \"%%1\" /r /d y && icacls \"%%1\" /grant administrators:F /t" /f > Nul
- Cls & Mode CON LINES=11 COLS=60 & Color 0D & Title Created By FreeBooter
- Echo.
- Echo.
- Echo.
- Echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
- Echo º Take Ownership Context Menu Enabled º
- Echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
- Echo.
- Echo.
- Taskkill /im Explorer.exe /f >Nul
- Start Explorer.exe
- ping -n 6 localhost >Nul
- Exit
- :_RegRestore
- Reg.exe delete "HKCR\*\shell\runas" /f > Nul
- Reg.exe delete "HKCR\Directory\shell\runas" /f > Nul
- Cls & Mode CON LINES=11 COLS=60 & Color 0D & Title Created By FreeBooter
- Echo.
- Echo.
- Echo.
- Echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
- Echo º Take Ownership Context Menu Disabled º
- Echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
- Echo.
- Echo.
- Taskkill /im Explorer.exe /f >Nul
- Start Explorer.exe
- ping -n 6 localhost >nul
- Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement