@echo off
::~~~~~~~~~~~~~~~~~~~~~~~~~~~ BEFORE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::server manager: enable remote desktop, disable feedback, turn off ie security, set time zone berlin, add german keyboard
::@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command " [System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
::choco install -y vmware-tools notepadplusplus 7zip googlechrome choco-upgrade-all-at
::Install-PackageProvider -Name NuGet -Force;Install-Module -Name PSWindowsUpdate -Force
::~~~~~~~~~~~~~~~~~~~~~~~~~~~ SYSPREP ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
set "scriptdir=%windir%\setup\scripts"
set "scriptlog=%windir%\setup\setupcomplete.log"
cd "%scriptdir%" && pushd
start "Setup Complete" cmd /c "mode 40,3 && echo/Installing... Please Wait!&echo(&ping localhost -n 999 >nul"
powershell -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "%scriptdir%\setupcomplete.ps1;">>%scriptlog%
powershell -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "ipmo PSWindowsUpdate;Install-WindowsUpdate -AcceptAll -Install -IgnoreReboot | Out-File c:\windows\setup\update.log">>%scriptlog%
::choco uninstall -y vmware-tools
choco upgrade all -y>>%scriptlog%
::choco install microsoft-office-deployment -y --params="'/64bit /Shared /Channel:MonthlyEnterpriseChannel /DisableUpdate:FALSE /Language:en-us,de-de /Product:O365ProPlusRetail /Exclude:Publisher,OneDrive,OneNote,Lync,Groove,Access,Teams'"
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%programfiles%\notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f
shutdown -s -t 1
rmdir "%scriptdir%" /s /q
::~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AFTER~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
exit /b
