Advertisement
FreeBooter

Attachments.bat

Sep 19th, 2017
685
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.75 KB | None | 0 0
  1. :: Created by FreeBooter
  2. @Echo Off
  3.  
  4. Cd %systemroot%\system32
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. REM  --> Check for permissions
  12. Reg query "HKU\S-1-5-19\Environment"
  13. REM --> If error flag set, we do not have admin.
  14. if %errorlevel% NEQ 0 (
  15. ECHO                 **************************************
  16. ECHO                  Running Admin shell... Please wait...
  17. ECHO                 **************************************
  18.  
  19.     goto UACPrompt
  20. ) else ( goto gotAdmin )
  21.  
  22. :UACPrompt
  23.     echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  24.     set params = "%*:"=""
  25.     echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
  26.  
  27.     "%temp%\getadmin.vbs"
  28.     del "%temp%\getadmin.vbs"
  29.     exit /B
  30.  
  31.  
  32. :gotAdmin
  33.  
  34. :_Start
  35. Cls & Mode CON  LINES=11 COLS=80 & Color 0D & Title Created By FreeBooter
  36. Echo.
  37. Echo.      
  38. Echo         Type (D) to Disable Blocking of Downloaded Files in Windows 10  
  39. Echo.      
  40. Echo         Type (E) to Enable Blocking of Downloaded Files in Windows 10
  41. Echo.
  42. Echo.        
  43.  
  44.  
  45. Set /p input= RESPONSE:
  46. If /i  Not %input%==D (Goto :_Ex) Else (Goto :_Disable)
  47.  
  48. :_Ex
  49. If /i  Not %input%==E  (Goto :_Start) Else (Goto :_Enable)
  50.  
  51.  
  52.  
  53. :_Disable
  54.  
  55. Reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments" /v "SaveZoneInformation" /t REG_DWORD /d "1" /f > Nul
  56.  
  57.  
  58. Cls & Mode CON  LINES=5 COLS=48 & Color 0E
  59.  Echo.
  60.  Echo.
  61.  Echo                     Disabled
  62.  
  63. Ping -n 5  localhost > Nul
  64. Exit
  65.  
  66. :_Enable
  67.  
  68.  
  69. Reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments" /v "SaveZoneInformation" /t REG_DWORD /d "0" /f > Nul
  70.  
  71.  
  72. Cls & Mode CON  LINES=5 COLS=48 & Color 0E
  73.  Echo.
  74.  Echo.
  75.  Echo                     Enabled
  76.  
  77. Ping -n 5  localhost > Nul
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement