@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-startup
::~~~~~~~~~~~~~~~~~~~~~~~~~~~ SYSPREP ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
set "scriptdir=%windir%\setup\scripts"
cd "%scriptdir%" && pushd
start "Setup Complete" cmd /c "mode 40,3 && echo/Installing... Please Wait!&echo(&ping localhost -n 999 >nul"
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
reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" /v AllowInsecureGuestAuth /d 1 /f /t REG_DWORD
powershell -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "%scriptdir%\Modules\ConfigureRemotingForAnsible.ps1;"
powershell -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "%scriptdir%\setupcomplete.ps1;"
::powershell -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "dism /online /add-package /packagepath:"%windir%\setup\scripts\de-de.cab";Set-WinSystemLocale de-DE;Set-WinUserLanguageList de-DE -Force;"
::choco uninstall -y vmware-tools
::choco upgrade all -y
::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'"
::add desktop shortcuts
::view hidden items and extensions for known file types, setup network sharing
::dotnet updates
shutdown -s -t 1
rmdir "%scriptdir%" /s /q
::~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AFTER~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
exit /b
