Advertisement
FreeBooter

Add install this update to cab files

Nov 14th, 2016
418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.94 KB | None | 0 0
  1. :: Created by FreeBooter
  2. @Echo Off
  3. Title Dost-Tech.com
  4. Cd %systemroot%\system32
  5. Call :IsAdmin
  6.  
  7.  
  8.  
  9.  
  10. :_Start
  11. Cls & Mode CON  LINES=11 COLS=70 & Color 0D &Title Created By FreeBooter
  12. Echo.
  13. Echo       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  14. Echo       º Type (R) to Remove Context Menu install *.cab updates º  
  15. Echo       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  16. Echo.
  17. Echo.
  18. Echo       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»  
  19. Echo       º Type (A) to Add Context Menu install *.cab updates    º  
  20. Echo       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ  
  21.  
  22.  
  23.  
  24. Set /p input= RESPONSE:
  25. If /i  Not %input%==R (Goto :_Ex) Else (Goto :_Remove)
  26.  
  27. :_Ex
  28. If /i  Not %input%==A  (Goto :_Start) Else (Goto :_Add)
  29.  
  30.  
  31. ::Add Context Menu install *.cab updates
  32. :_Add
  33. Reg Add "HKCR\CABFolder\Shell\RunAs" /ve /t REG_SZ /d "Install this update" /f
  34. Reg Add "HKCR\CABFolder\Shell\RunAs" /v "HasLUAShield" /t REG_SZ /d "" /f
  35. Reg Add "HKCR\CABFolder\Shell\RunAs\Command" /ve /t REG_SZ /d "cmd /k dism /online /add-package /packagepath:\"%%1\"" /f
  36.  
  37.  
  38. Cls & Mode CON  LINES=5 COLS=48 & Color 0E
  39.  Echo.
  40.  Echo.
  41.  Echo                     FINNISH
  42.  
  43. Ping -n 5  localhost > Nul
  44. Exit
  45.  
  46.  
  47.  
  48.  
  49. ::Remove Context Menu install *.cab updates
  50. :_Remove
  51. Reg Delete "HKCR\CABFolder\Shell\RunAs" /f
  52.  
  53. Cls & Mode CON  LINES=5 COLS=48 & Color 0E
  54.  Echo.
  55.  Echo.
  56.  Echo                     FINNISH
  57.  
  58. Ping -n 5  localhost > Nul
  59. Exit
  60.  
  61.  
  62. :IsAdmin
  63. Reg query "HKU\S-1-5-19\Environment"
  64. If Not %ERRORLEVEL% EQU 0 (
  65.  Cls & Mode CON  LINES=5 COLS=48 & Color 0C & Title - WARNING -
  66.  Echo.
  67.  Echo.
  68.  Echo  YOU MUST HAVE ADMINISTRATOR RIGHTS TO CONTINUE
  69.  Pause > Nul & Exit
  70. )
  71. Cls
  72. goto:eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement