SHARE
TWEET

Enable/Disable System authority level CMD (Batch)

Imthedude025 Mar 28th, 2018 (edited) 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2. ::Enable/Disable System authority level CMD                  ::
  3. ::Be cautious - This CMD is EXTREMELY powerful               ::
  4. ::Created by RU$$ [http://russdev.mooo.com/]                 ::
  5. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  6. ::Instructions -                                             ::
  7. ::Run the script then lock your account.                     ::
  8. ::Open the narrator at the bottom left.                      ::
  9. ::An CMD window will open. Type "whoami" too see Ur status   ::
  10. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  11. @echo off
  12. title Enable/Disable System authority level CMD
  13.  
  14. ::Check if CMD is open as admin
  15. NET SESSION >nul 2>&1
  16. IF %ERRORLEVEL% EQU 0 (goto :BEGIN) ELSE (goto :NOTADMIN)
  17.  
  18. :NOTADMIN
  19. cls
  20. echo ERROR: You need to run as an Administrator!
  21. echo.
  22. pause
  23. exit.
  24.  
  25. ::Code start
  26. :BEGIN
  27. cls
  28.  
  29. if exist "C:\Windows\System32\UtilmanBKUP.exe" (GOTO :PRE-ENABLED) else (GOTO :PRE-DISABLED)
  30.  
  31. ::Check if Disable Continue
  32. :PRE-ENABLED
  33. cls
  34. SET INPUT=
  35. SET /P INPUT= Do you wish to remove Sys CMD? (Y/N):
  36. IF /I '%INPUT%'=='Y' goto :REMOVE
  37. IF /I '%INPUT%'=='y' goto :REMOVE
  38. IF /I '%INPUT%'=='N' exit
  39. IF /I '%INPUT%'=='n' exit
  40.  
  41. goto :PRE-ENABLED
  42.  
  43. ::Remove files
  44. :REMOVE
  45. cd C:\Windows\System32
  46.  
  47. DEL cmd2.exe
  48. DEL Utilman.exe
  49.  
  50. rename UtilmanBKUP.exe Utilman.exe
  51.  
  52. cls
  53. echo SUCCESS: The files have been restored to defaults.
  54. echo.
  55. pause.
  56. exit.
  57.  
  58. ::Check if Enable Continue
  59. :PRE-DISABLED
  60. cls
  61. SET INPUT=
  62. SET /P INPUT= Do you wish to add Sys CMD? (Y/N):
  63. IF /I '%INPUT%'=='Y' goto :ADD
  64. IF /I '%INPUT%'=='y' goto :ADD
  65. IF /I '%INPUT%'=='N' exit
  66. IF /I '%INPUT%'=='n' exit
  67.  
  68. goto :PRE-DISABLED
  69.  
  70. ::Add files
  71. :ADD
  72. ::Take ownership
  73. takeown /f cmd.exe
  74. icacls cmd.exe /grant administrators:f
  75. takeown /f Utilman.exe
  76. icacls Utilman.exe /grant administrators:f
  77.  
  78. copy cmd.exe cmd2.exe
  79. copy Utilman.exe UtilmanBKUP.exe
  80. DEL Utilman.exe
  81. rename cmd2.exe Utilman.exe
  82.  
  83. cls
  84. echo SUCCESS: The files have been modified.
  85. echo.
  86. pause.
  87. exit.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top