Advertisement
FreeBooter

ControlPanelContextMenu.bat

Aug 28th, 2017
447
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.56 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=75 & Color 0D & Title Created By FreeBooter
  33. Echo.
  34. Echo.
  35. Echo.
  36. Echo       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  37. Echo       º Do You Want To Add Control Panel to the Context Menu (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.exe add "HKCR\Directory\Background\shell\Control Panel\command" /ve /t REG_SZ /d "rundll32.exe shell32.dll,Control_RunDLL" /f > Nul
  55.  
  56.  
  57. Cls & Mode CON  LINES=11 COLS=55 & Color 0D & Title Created By FreeBooter
  58. Echo.
  59. Echo.
  60. Echo.
  61. Echo       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  62. Echo       º  Control Panel Added to Context Menu º  
  63. Echo       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  64. Echo.
  65. Echo.
  66.  
  67. Taskkill /im Explorer.exe /f >Nul
  68.  
  69. Start Explorer.exe
  70.  
  71. ping -n 6 localhost >Nul
  72. Exit
  73.  
  74.  
  75. :_RegRestore
  76.  
  77.  
  78. Reg.exe delete "HKCR\Directory\Background\shell\Control Panel" /f > Nul
  79. Reg.exe delete "HKCR\Directory\Background\shell\Control Panel\command" /f > Nul
  80.  
  81.  
  82. Cls & Mode CON  LINES=11 COLS=55 & Color 0D & Title Created By FreeBooter
  83. Echo.
  84. Echo.
  85. Echo.
  86. Echo       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  87. Echo       º Control Panel Removed From Context Menu  º  
  88. Echo       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  89. Echo.
  90. Echo.
  91.  
  92. Taskkill /im Explorer.exe /f >Nul
  93.  
  94. Start Explorer.exe
  95.  
  96. ping -n 6 localhost >nul
  97. Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement