Advertisement
FreeBooter

Set_Time_Limit

Aug 19th, 2022
1,263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.48 KB | Fixit | 0 0
  1. :: Set Logon Time Limits For Any Account in Windows 10 and Windows 11
  2.  
  3.  
  4. @Echo Off
  5.  
  6. Cls & Color 0E
  7.  
  8.  
  9. :::
  10. :::        ·   ·▐ ▄ ▄▄▄ .▄▄▄  ·▄▄▄▄▪  ·  ▪
  11. :::          · •█▌▐█▀▄.▀·▀▄ █·██▪ ██   .  
  12. :::        ▪   ▐█▐▐▌▐▀▀▪▄▐▀▀▄ ▐█· ▐█▌   ▪
  13. :::         · ▪██▐█▌▐█▄▄▌▐█•█▌██. ██ .   .
  14. :::        ▪   ▀▀ █▪ ▀▀▀ .▀  ▀▀▀▀▀▀•  ▪  
  15. :::        ▄▄▄  ▄▄▄ . ▌ ▐·  .   ▄▄▌ ▐▄▄▄▄▌
  16. :::        ▀▄ █·▀▄.▀·▪█·█▌▪     ██•  •██  
  17. :::        ▐▀▀▄ ▐▀▀▪▄▐█▐█• ▄█▀▄ ██▪   ▐█.▪
  18. :::        ▐█•█▌▐█▄▄▌ ███ ▐█▌.▐▌▐█▌▐▌ ▐█▌·
  19. :::        .▀  ▀ ▀▀▀ . ▀   ▀█▄▀▪.▀▀▀  ▀▀▀
  20. :::        (ccc)2022 by {FreeBooter} @NerdRevolt https://discord.gg/pfmjUJX
  21. :::
  22. :::    /// ::: /// ::: /// ::: /// ::: /// :::
  23.  
  24.  
  25.  
  26. (Net session >nul 2>&1)||(PowerShell start """%~0""" -verb RunAs & Exit /B)
  27.  
  28.  
  29.  
  30. :_CHOICE
  31.  
  32. Cls & Mode CON  LINES=11 COLS=80 & Color 0E & Title Created By FreeBooter
  33. Echo.
  34. Echo.
  35. Echo.
  36. Echo        1 - Do You Want to Set Time Limit for %UserName%    
  37. Echo.      
  38. Echo        2 - Allow the %UserName% Access at all Times.
  39. Echo.
  40.  
  41.  
  42. Set /p input=:^>
  43.  
  44. If Not %input%==1 (Goto :_Ex) Else (Goto :_Enable)
  45.  
  46. :_Ex
  47. If Not %input%==2  (Goto :_CHOICE) Else (Goto :_Disable)
  48.  
  49.  
  50.  
  51. :_Enable
  52. Cls
  53. Echo.
  54. Echo            Specify the times that users are allowed to use the computer.
  55. Echo            You can use 12-hour or 24-hour notation for hours.
  56. Echo            If you use 12-hour notation, use AM and PM, or A.M. and P.M.
  57. Echo            You can use any of these syntax 08:00 or 8am.
  58. Echo.
  59. Echo            Type Logoff Hour
  60. Echo.
  61. Set /p Start=:^>
  62. Cls
  63. Echo.
  64. Echo            Type Login Hour
  65. Echo.
  66. Set /p Login=:^>
  67.  
  68.  
  69. Net user %UserName% /times:M-Su,%Start%-%Login%
  70.  
  71.  
  72.  
  73. Cls & Mode CON  LINES=11 COLS=60 & Color 0E & Title Created By FreeBooter
  74. Echo.
  75. Echo.
  76. Echo.
  77. Echo.
  78. Echo          Denying %UserName% Access to Windows    
  79. Echo.
  80. Echo.
  81. Echo.
  82. Ping -n 4 localhost >Nul
  83. Exit
  84.  
  85.  
  86.  
  87. :_Disable
  88.  
  89.  
  90. Net user %UserName% /time:all
  91.  
  92. Cls & Mode CON  LINES=11 COLS=70 & Color 0E & Title Created By FreeBooter
  93. Echo.
  94. Echo.
  95. Echo.
  96. Echo.
  97. Echo          Allowing the %UserName% Access to Windows at all Times
  98. Echo.
  99. Echo.
  100. Echo.
  101. Ping -n 4 localhost >Nul
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement