├── .gitattributes ├── choco.preset ├── install.bat ├── license.md └── readme.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /choco.preset: -------------------------------------------------------------------------------- 1 | googlechrome, 2 | imgburn, 3 | 7zip.install, 4 | vlc, 5 | aimp, 6 | spotify, 7 | jre8, 8 | irfanview, 9 | irfanviewplugins, 10 | sharex, 11 | qbittorrent, 12 | steam, 13 | keepass.install, 14 | keepass-keepasshttp, 15 | keepass-langfiles, 16 | visualstudiocode, 17 | notepadplusplus.install, 18 | -------------------------------------------------------------------------------- /install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :: BatchGotAdmin 4 | :------------------------------------- 5 | REM --> Check for permissions 6 | >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" 7 | 8 | REM --> If error flag set, we do not have admin. 9 | if '%errorlevel%' NEQ '0' ( 10 | echo Requesting administrative privileges... 11 | goto UACPrompt 12 | ) else ( goto gotAdmin ) 13 | 14 | :UACPrompt 15 | echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" 16 | echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs" 17 | 18 | "%temp%\getadmin.vbs" 19 | exit /B 20 | 21 | :gotAdmin 22 | if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" ) 23 | pushd "%CD%" 24 | CD /D "%~dp0" 25 | :-------------------------------------- 26 | 27 | ::-----Check if Chocolaty is already Installed 28 | if exist "C:\ProgramData\chocolatey\choco.exe" ( 29 | cls 30 | echo Chocolatey is already Installed on this machine... 31 | 32 | echo Installing now specified packages... 33 | call :choco-programme-install 34 | 35 | cls 36 | echo Running the Win10-Initial-Setup-Script... 37 | call :Win10-Initial-Setup-Script 38 | 39 | cls 40 | echo All done! 41 | pause 42 | exit 43 | 44 | ) else ( 45 | cls 46 | echo Chocolatey is not Installed on this machine, installing now... 47 | call :install-chocolatey 48 | 49 | cls 50 | echo Installing now specified packages... 51 | call :choco-programme-install 52 | 53 | cls 54 | echo Running the Win10-Initial-Setup-Script... 55 | call :Win10-Initial-Setup-Script 56 | 57 | cls 58 | echo All done! 59 | pause 60 | exit 61 | ) 62 | 63 | ::-----Chocolatey Install Script 64 | :install-chocolatey 65 | @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" 66 | 67 | ::-----Start Intall loop 68 | :choco-programme-install 69 | choco install git --acceptlicense -y 70 | for /f "delims=," %%a in (.\choco.preset) do choco install %%a --acceptlicense -y 71 | cls 72 | echo Package %%a is installing... 73 | cls 74 | choco upgrade all -y 75 | pause 76 | 77 | ::-----Win10 Initial Setup Script 78 | :Win10-Initial-Setup-Script 79 | 80 | if exist Win10-Initial-Setup-Script (rmdir /S /Q .\Win10-Initial-Setup-Script && echo old Repo deleted, the new one will be downloaded now....) 81 | 82 | git clone https://github.com/Disassembler0/Win10-Initial-Setup-Script.git 83 | if exist "reclaim.preset" ( 84 | cls 85 | echo custom preset found... 86 | call powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\Win10-Initial-Setup-Script\Win10.ps1" -preset ".\reclaim.preset" 87 | ) else ( 88 | cls 89 | echo No custom preset found, reverting to defaults... 90 | call powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\Win10-Initial-Setup-Script\Win10.ps1" -preset "\Win10-Initial-Setup-Script\Default.preset" 91 | 92 | ) -------------------------------------------------------------------------------- /license.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 SoXX-TheFennec 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Firstrun for Windows 10 2 | 3 | This script aims to minimize the amount of time and work to reprovision your Windows 10 machine. It basically runs [Win10 Initial Setup Script](#usage-of-other-software) and uses Chocolatey to reinstall your software. 4 | 5 | ## Important information 6 | 7 | - It may happen that you are not able to Update windows anymore, a quick fix is to make a `reclaim.preset` file and add this line `EnableTelemetry`. 8 | - Please refer to the FAQ from the [Win10 Initial Setup Script](#usage-of-other-software) Repository for any questions. 9 | 10 | ## Configuration and usage 11 | 12 | ### Configuration 13 | 14 | `install.preset`: List your Chocolatey package names line- and comma separated. (a sample `choco.preset` is included) 15 | 16 | If you want to customize what the [Win10 Initial Setup Script](#usage-of-other-software) does, create a file called `reclaim.preset` and modify the settings. Please refer to the official [Win10 Initial Setup Script](#usage-of-other-software) Repository for detailed information. 17 | 18 | ### Usage 19 | 20 | - Run `install.bat`. 21 | 22 | ## Usage of other software 23 | 24 | The Script uses: 25 | 26 | - [Win10 Initial Setup Script](https://github.com/Disassembler0/Win10-Initial-Setup-Script) script from [Disassembler0](https://github.com/Disassembler0) 27 | 28 | - [Chocolatey](https://github.com/chocolatey/choco) 29 | 30 | ## TODO & Ideas 31 | 32 | ### TODO 33 | 34 | - Fix the installation routine to apply only ones after that it should only update the programs 35 | 36 | ### Ideas 37 | 38 | - One configuration file for anything (YAML, INI) 39 | - CLI parameter for different profiles 40 | 41 | ## License 42 | 43 | [MIT](https://mit-license.org/) --------------------------------------------------------------------------------