Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo off
- cls
- SET WINDOW_WIDTH=100
- SET WINDOW_HEIGHT=42
- mode con: cols=%WINDOW_WIDTH% lines=%WINDOW_HEIGHT%
- Set SOURCEPATH=\networkpath
- Set JAVAPATH=%SOURCEPATH%Java
- @echo [TASK] Adding CITYWorkstationAdmins to Administrators
- 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)
- @echo [TASK] Installing Windows 10 Corporate Pro Key ([XXXXX-XXXXX-XXXXX-XXXXX-XXXXX[0m^)
- 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)
- @echo [TASK] Installing Java
- call "%JAVAPATH%jre-6u30-windows-i586.exe" /s && (call :printPass && echo Java installation complete) || (call :printFail && echo Java installation failed)
- reg delete HKLMSoftwareWow6432NodeMicrosoftWindowsCurrentVersionRun /v SunJavaUpdateSched /f > NUL 2>&1
- @echo [TASK] Configuring Remote Registry to Automatically Start
- 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)
- @echo [TASK] Starting Remote Registry
- net start RemoteRegistry >Nul 2>&1 (call :printPass && echo Remote registry started) || (call :printFail && echo Failed to start remote registry, may already be started)
- @echo [TASK] Disabling Automatic Sleep
- powercfg /change standby-timeout-ac 0 >Nul 2>&1 && (call :printPass && echo AC sleep disabled) || (call :printFail && echo AC sleep still enabled)
- powercfg /change standby-timeout-dc 0 >Nul 2>&1 && (call :printPass && echo DC sleep disabled) || (call :printFail && echo DC sleep still enabled)
- @echo [TASK] Disabling Automatic Hibernation
- powercfg /change hibernate-timeout-ac 0 >Nul 2>&1 && (call :printPass && echo AC hibernation disabled) || (call :printFail && echo AC hibernation still enabled)
- powercfg /change hibernate-timeout-dc 0 >Nul 2>&1 && (call :printPass && echo DC hibernation disabled) || (call :printFail && echo DC hibernation still enabled)
- @echo [TASK] Disabling Hybrid Sleep.
- 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)
- 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)
- @echo [TASK] Clearing Login Screen.
- 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)
- 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)
- 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)
- @echo [TASK] Enabling Screensaver Timeout and Password
- 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)
- 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)
- @echo [TASK] Updating group policy
- echo n | gpupdate /force /wait:0 >Nul 2>&1 && (call :printPass && echo Group Policy Updated) || (call :printFail && echo Group Policy update failed)
- @echo [INFO] Configuration Complete.
- @echo *Check if any errors occured.*
- @echo Press any key to exit. && pause>Nul
- goto:eof
- :printFail
- call :printInfo
- echo |set /p="[31m[FAIL][0m "
- EXIT /B 0
- :printPass
- call :printInfo
- echo |set /p="[32m[PASS][0m "
- EXIT /B 0
- :printInfo
- echo|set /p=[INFO]
- EXIT /B 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement