Advertisement
FreeBooter

PermanentDelete.bat

Aug 30th, 2017
680
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 3.27 KB | None | 0 0
  1. @Echo Off
  2. Color 1A
  3.  
  4. Cd %systemroot%\system32
  5.  
  6.  
  7.  
  8.  
  9. REM  --> Check for permissions
  10. Reg query "HKU\S-1-5-19\Environment"
  11. REM --> If error flag set, we do not have admin.
  12. if %errorlevel% NEQ 0 (
  13. ECHO                 **************************************
  14. ECHO                  Running Admin shell... Please wait...
  15. ECHO                 **************************************
  16.  
  17.     goto UACPrompt
  18. ) else ( goto gotAdmin )
  19.  
  20. :UACPrompt
  21.     echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  22.     set params = "%*:"=""
  23.     echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
  24.  
  25.     "%temp%\getadmin.vbs"
  26.     del "%temp%\getadmin.vbs"
  27.     exit /B
  28.  
  29.  
  30. :gotAdmin
  31.  
  32. Cls & Mode CON  LINES=11 COLS=90 & Color 0D & Title Created By FreeBooter
  33. Echo.
  34. Echo.
  35. Echo.
  36. Echo       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  37. Echo       º Do You Want To Add Permanently Delete to Context Menu in Windows 10 (Y/N)? º  
  38. Echo       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  39. Echo.
  40. Echo.
  41.  
  42.  
  43. Set /p input= RESPONSE:
  44.  
  45. If /i  Not %input%==Y (Goto :_Ex) Else (Goto :_Start)
  46.  
  47. :_Ex
  48. If /i Not %input%==N  (Goto :EOF) Else (Goto :_RegRestore)
  49.  
  50.  
  51.  
  52. :_Start
  53.  
  54. Reg add "HKCR\*\shell\Windows.PermanentDelete" /v "CommandStateSync" /t REG_SZ /d "" /f > Nul
  55. Reg add "HKCR\*\shell\Windows.PermanentDelete" /v "ExplorerCommandHandler" /t REG_SZ /d "{E9571AB2-AD92-4ec6-8924-4E5AD33790F5}" /f >Nul
  56. Reg add "HKCR\*\shell\Windows.PermanentDelete" /v "Icon" /t REG_SZ /d "shell32.dll,-240" /f >Nul
  57. Reg add "HKCR\Directory\shell\Windows.PermanentDelete" /v "CommandStateSync" /t REG_SZ /d "" /f >Nul
  58. Reg add "HKCR\Directory\shell\Windows.PermanentDelete" /v "ExplorerCommandHandler" /t REG_SZ /d "{E9571AB2-AD92-4ec6-8924-4E5AD33790F5}" /f >Nul
  59. Reg add "HKCR\Directory\shell\Windows.PermanentDelete" /v "Icon" /t REG_SZ /d "shell32.dll,-240" /f >Nul
  60.  
  61.  
  62.  
  63.  
  64. Cls & Mode CON  LINES=11 COLS=60 & Color 0D & Title Created By FreeBooter
  65. Echo.
  66. Echo.
  67. Echo.
  68. Echo       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  69. Echo       º  Permanently Delete Context Menu Enabled º  
  70. Echo       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  71. Echo.
  72. Echo.
  73.  
  74. Taskkill /im Explorer.exe /f >Nul
  75.  
  76. Start Explorer.exe
  77.  
  78. ping -n 6 localhost >Nul
  79. Exit
  80.  
  81.  
  82. :_RegRestore
  83.  
  84. Reg Query "HKCR\*\shell\Windows.PermanentDelete"  > Nul
  85.  
  86. If %ErrorLevel% EQU 1 Goto :EOF
  87.  
  88. Reg delete "HKCR\*\shell\Windows.PermanentDelete" /f > Nul
  89.  
  90. Reg delete "HKCR\Directory\shell\Windows.PermanentDelete" /f > Nul
  91.  
  92.  
  93. Cls & Mode CON  LINES=11 COLS=60 & Color 0D & Title Created By FreeBooter
  94. Echo.
  95. Echo.
  96. Echo.
  97. Echo       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  98. Echo       º Permanently Delete Context Menu Disabled  º  
  99. Echo       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  100. Echo.
  101. Echo.
  102.  
  103. Taskkill /im Explorer.exe /f >Nul
  104.  
  105. Start Explorer.exe
  106.  
  107. ping -n 6 localhost >Nul
  108. Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement