summaryrefslogblamecommitdiffstats
path: root/win10-prep.bat
blob: 43a30e13d117d8fe46a0c4e973035b360ec76128 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12


         
                            







                                                                               












                                                       

           
                                
                         

                                  
                           
         

                                    
         

                                      

                           
                   
         

            
     





                                    
    

















                                                                                                                 
                                     




























                                                                                                                           















                                                                                                                                                                                                                              
                                                                                                                                        
                            
                                                                                                                                                                                                                                                                                                                                               
                                                    
                                                                                                          
                                                                                                                      

                                                                                                                       
                                                                                                                   
                                                                                                                                         
                                                                                                              

                                                                                                                  
                                                             


                                                                                                  






                                                                                                                             


































                                                                                                                                                                      
                                                                                                                        


                                                                                                                        
                                                                                                                           
                                                                                                            
                                                                                                                                       












                                                                                                                             


                                                                                                    





                                                                                                             







                                                                                                                            




                                                                                                                 










                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
                                                                                                                        



                                                                                                                                               

                                                                                                              

                                                                                        






























                                                                                                                                             








                                                                                                                                                                     



                                                                                                                      





                                                                                                                                                    



                                              

                                                                              



                                                                                               


                                                                                         



                                                                                      







                                                                                                             

                                                                                                         
                      















                                                                                                                              





































                                                                                                                                                                                                        
                                                                                               








                                                                                                                                         
                                                            




                                                                             
                                                      












                                                                                                                                                                


                                                                                               








                                                                                            
                    
rem intro
@echo off
title Windows 10 Prep Script
pushd "%~dp0"
cls
echo.
echo  :: Windows 10 Prep Script
echo.
echo     Please review and be aware of what this script does before running it.
echo     There is no uninstaller, and backups won't be created.
echo.
rem check permissions
net session >nul 2>&1
if %errorLevel% == 0 (
    echo     You won't be prompted any further.
    echo     Press [enter] to begin.
    echo.
    set /p=
) else (
    echo     This script requires administrator rights.
    echo     Press any key to exit
    pause >nul
    exit
)

rem Process
<NUL set /p=:: System Tweaks... 
call :system_tweaks > nul
echo done
<NUL set /p=:: Registry Tweaks... 
call :registry_tweaks > nul
echo done
<NUL set /p=:: Removing Software... 
call :remove_software > nul
echo done
<NUL set /p=:: Installing Software... 
call :install_software > nul
echo done
<NUL set /p=:: Clean Up... 
call :cleanup > nul
echo done

rem complete
echo.
echo  :: Script complete
echo.
echo     Restart whenever you fancy.
echo     Press [enter] to exit.
echo.
set /p=
:eof
exit

:system_tweaks
rem enable f8 boot menu
bcdedit /set {default} bootmenupolicy legacy
rem enable admin account
net user Administrator /active:yes
rem label system drive
label %systemdrive%System
rem disable hibernation, removing hiberfil.sys
powercfg -h off
rem change ntp server addresses and resync time
w32tm /config /syncfromflags:manual /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org"
w32tm /resync /nowait
rem don't require signin after wakeup
powercfg /SETDCVALUEINDEX SCHEME_CURRENT SUB_NONE CONSOLELOCK 0
powercfg /SETACVALUEINDEX SCHEME_CURRENT SUB_NONE CONSOLELOCK 0
rem batch file shortcuts
echo cls> %windir%\system32\clear.bat
echo robocopy . . /s /move> %windir%\system32\empties.bat
echo findstr %1> %windir%\system32\grep.bat
echo dir /b> %windir%\system32\ls.bat
echo del %1> %windir%\system32\rm.bat
echo exit> %windir%\system32\x.bat
exit /b %errorlevel%

:registry_tweaks
rem disable lock screen
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization" /v NoLockScreen /t REG_DWORD /d 1 /f
rem maximum mouse speed
reg add "HKCU\Control Panel\Mouse" /v "MouseSensitivity" /t REG_SZ /d "20" /f
rem disable hiding of unused tray icons
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "EnableAutoTray" /t REG_DWORD /d 0 /f
rem disable snap assist
rem reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "SnapAssist" /t REG_DWORD /d "0" /f
rem show hidden files in explorer
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Hidden" /t REG_DWORD /d 1 /f
rem show file extensions in explorer
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d "0" /f
rem disable advertising maybe
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v "Enabled" /t REG_DWORD /d "0" /f
reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v "Enabled" /t REG_DWORD /d "0" /f
rem di