Advertisement
Joker175

Accesso Alle Cartella Controllato Context

Apr 6th, 2019
405
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. :: Aggiungere Permetti App in Accesso Controllato al Context Menu in Windows 10
  2.  
  3. @Echo Off
  4. Cls & Color 1A
  5.  
  6. Cd %systemroot%\system32
  7.  
  8. net sess>nul 2>&1||(start mshta vbscript:code(close(Execute("CreateObject(""Shell.Application"").ShellExecute""%~0"",,,""RunAs"",1"^)^)^)&exit)
  9.  
  10. Cls & Mode CON LINES=11 COLS=80 & Color 0D & Title Created By FreeBooter
  11. Echo.
  12. Echo.
  13. Echo.
  14. Echo.
  15. Echo Aggiungere Permetti App in Accesso Controllato al Context Menu (Y/N)?
  16. Echo.
  17. Echo.
  18. Echo.
  19.  
  20.  
  21. Set /p input= RESPONSE:
  22.  
  23. If /i Not %input%==Y (Goto :_Ex) Else (Goto :_Start)
  24.  
  25. :_Ex
  26. If /i Not %input%==N (Goto :EOF) Else (Goto :_RegRestore)
  27.  
  28.  
  29.  
  30. :_Start
  31.  
  32. Reg.exe add "HKCR\exefile\Shell\AllowAppThroughCFA" /ve /t REG_SZ /d "Permetti App in Accesso Controllato" /f > Nul
  33. Reg.exe delete "HKCR\exefile\Shell\AllowAppThroughCFA" /v "Extended" /f > Nul
  34. Reg.exe add "HKCR\exefile\Shell\AllowAppThroughCFA" /v "HasLUAShield" /t REG_SZ /d "" /f > Nul
  35. Reg.exe add "HKCR\exefile\Shell\AllowAppThroughCFA" /v "Icon" /t REG_SZ /d "%%ProgramFiles%%\Windows Defender\EppManifest.dll,-101" /f > Nul
  36. Reg.exe add "HKCR\exefile\Shell\AllowAppThroughCFA\command" /ve /t REG_SZ /d "PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/c,start PowerShell.exe Add-MpPreference -ControlledFolderAccessAllowedApplications \"\"%%1\"\"' -Verb RunAs\"" /f > Nul
  37.  
  38.  
  39. Cls & Mode CON LINES=11 COLS=80 & Color 0D & Title Created By FreeBooter
  40. Echo.
  41. Echo.
  42. Echo.
  43. Echo.
  44. Echo Sto aggiungendo Permetti App in Accesso Controllato al Context Menu
  45. Echo.
  46. Echo.
  47. Echo.
  48. Ping -n 6 localhost >Nul
  49. Exit
  50.  
  51.  
  52. :_RegRestore
  53.  
  54. Reg.exe delete "HKCR\exefile\Shell\AllowAppThroughCFA" /f > Nul
  55.  
  56.  
  57.  
  58. Cls & Mode CON LINES=11 COLS=80 & Color 0D & Title Created By FreeBooter
  59. Echo.
  60. Echo.
  61. Echo.
  62. Echo.
  63. Echo Removing Allow App Through Controlled Folder Access Context Menu
  64. Echo.
  65. Echo.
  66. Echo.
  67. Ping -n 6 localhost >Nul
  68. Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement