Advertisement
Guest User

Untitled

a guest
Jul 15th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.42 KB | None | 0 0
  1. echo off
  2. cls
  3.  
  4. SET WINDOW_WIDTH=100
  5. SET WINDOW_HEIGHT=42
  6. mode con: cols=%WINDOW_WIDTH% lines=%WINDOW_HEIGHT%
  7.  
  8. Set SOURCEPATH=\networkpath
  9. Set JAVAPATH=%SOURCEPATH%Java
  10.  
  11. @echo [TASK] Adding CITYWorkstationAdmins to Administrators
  12. net localgroup Administrators CITYWorkstationAdmins /add >Nul 2>&1 && (call :printPass && echo CITYWorkstationAdmins added to computer) || (call :printFail && echo Failed to add CITYWorkstationAdmins to Administrators, may already be added)
  13.  
  14. @echo [TASK] Installing Windows 10 Corporate Pro Key ([XXXXX-XXXXX-XXXXX-XXXXX-XXXXX[0m^)
  15. start slmgr.vbs //b /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX && (call :printPass && echo Windows 10 Pro Key Installed) || (call :printFail && echo Failed to add Windows 10 Pro Key)
  16.  
  17. @echo [TASK] Installing Java
  18. call "%JAVAPATH%jre-6u30-windows-i586.exe" /s && (call :printPass && echo Java installation complete) || (call :printFail && echo Java installation failed)
  19. reg delete HKLMSoftwareWow6432NodeMicrosoftWindowsCurrentVersionRun /v SunJavaUpdateSched /f > NUL 2>&1
  20.  
  21. @echo [TASK] Configuring Remote Registry to Automatically Start
  22. sc.exe config RemoteRegistry start= auto >Nul 2>&1 && (call :printPass && echo Remote registry will auto start on boot) || (call :printFail && echo Failed to set remote registry to auto start, may already be set)
  23.  
  24. @echo [TASK] Starting Remote Registry
  25. net start RemoteRegistry >Nul 2>&1 (call :printPass && echo Remote registry started) || (call :printFail && echo Failed to start remote registry, may already be started)
  26.  
  27. @echo [TASK] Disabling Automatic Sleep
  28. powercfg /change standby-timeout-ac 0 >Nul 2>&1 && (call :printPass && echo AC sleep disabled) || (call :printFail && echo AC sleep still enabled)
  29. powercfg /change standby-timeout-dc 0 >Nul 2>&1 && (call :printPass && echo DC sleep disabled) || (call :printFail && echo DC sleep still enabled)
  30.  
  31. @echo [TASK] Disabling Automatic Hibernation
  32. powercfg /change hibernate-timeout-ac 0 >Nul 2>&1 && (call :printPass && echo AC hibernation disabled) || (call :printFail && echo AC hibernation still enabled)
  33. powercfg /change hibernate-timeout-dc 0 >Nul 2>&1 && (call :printPass && echo DC hibernation disabled) || (call :printFail && echo DC hibernation still enabled)
  34.  
  35. @echo [TASK] Disabling Hybrid Sleep.
  36. powercfg -setacvalueindex SCHEME_BALANCED SUB_SLEEP HYBRIDSLEEP 0 >Nul 2>&1 && (call :printPass && echo AC hybrid sleep disabled) || (call :printFail && echo AC hybrid sleep still enabled)
  37. powercfg -setdcvalueindex SCHEME_BALANCED SUB_SLEEP HYBRIDSLEEP 0 >Nul 2>&1 && (call :printPass && echo DC hybrid sleep disabled) || (call :printFail && echo DC hybrid sleep still enabled)
  38.  
  39. @echo [TASK] Clearing Login Screen.
  40. REG add "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionAuthenticationLogonUI" /v LastLoggedOnDisplayName /t REG_SZ /d "" /f >Nul 2>&1 && (call :printPass && echo Removed last logged on DisplayName) || (call :printFail && echo Could not remove last logged on DisplayName)
  41. REG add "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionAuthenticationLogonUI" /v LastLoggedOnSAMUser /t REG_SZ /d "" /f >Nul 2>&1 && (call :printPass && echo Removed last logged on SAMUser) || (call :printFail && echo Could not remove last logged on SAMUser)
  42. REG add "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionAuthenticationLogonUI" /v LastLoggedOnUser /t REG_SZ /d "" /f >Nul 2>&1 && (call :printPass && echo Removed last logged on User) || (call :printFail && echo Could not remove last logged on User)
  43.  
  44. @echo [TASK] Enabling Screensaver Timeout and Password
  45. REG add "HKCUSoftwarePoliciesMicrosoftWindowsControl PanelDesktop" /v ScreenSaverIsSecure /t REG_SZ /d 1 /f >Nul && (call :printPass && echo Set Screensaver password) || (call :printFail && echo Could not set Screensaver password)
  46. REG add "HKCUSoftwarePoliciesMicrosoftWindowsControl PanelDesktop" /v ScreenSaveTimeOut /t REG_SZ /d 900 /f >Nul && (call :printPass && echo Set Screensaver password) || (call :printFail && echo Could not set Screensaver timeout)
  47.  
  48. @echo [TASK] Updating group policy
  49. echo n | gpupdate /force /wait:0 >Nul 2>&1 && (call :printPass && echo Group Policy Updated) || (call :printFail && echo Group Policy update failed)
  50.  
  51. @echo [INFO] Configuration Complete.
  52. @echo *Check if any errors occured.*
  53. @echo Press any key to exit. && pause>Nul
  54. goto:eof
  55.  
  56. :printFail
  57. call :printInfo
  58. echo |set /p="[31m[FAIL][0m "
  59. EXIT /B 0
  60.  
  61. :printPass
  62. call :printInfo
  63. echo |set /p="[32m[PASS][0m "
  64. EXIT /B 0
  65.  
  66. :printInfo
  67. echo|set /p=[INFO]
  68. EXIT /B 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement