2
0
tcse-deploy/TCSE-Computer-Deploy.bat
2024-12-09 21:16:35 -06:00

80 lines
2.9 KiB
Batchfile

@echo off
:: Install Winget Package Manager
C:\Scripts\Software\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
:: Install Chocolatey Package Manager
timeout /t 30
echo Installing Chocolatey...
C:\Users\Tech\AppData\Local\Microsoft\WindowsApps\winget.exe install --id chocolatey.chocolatey --source winget
:: Install Chocolatey Software
echo Installing Chocolatey Software...
C:\ProgramData\Chocolatey\choco.exe upgrade adobereader -y --ignore-checksums
C:\ProgramData\Chocolatey\choco.exe install googlechrome -y --ignore-checksums
C:\ProgramData\Chocolatey\choco.exe install google-drive-file-stream -y --ignore-checksums
:: Install Printers
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Printers\01-Printer-Scripts\01-PrinterInstall-AllPrinters.ps1"
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Printers\01-Printer-Scripts\02.2-PrinterProperties-Import.ps1"
:: Set Time Zone
tzutil /s "Central Standard Time"
:: Install Additional Software
echo Installing Additional Software...
echo Installing GCPW...
C:\Scripts\Software\gcpwstandaloneenterprise64.exe /silent /fullinstall
echo GCPW Installed...
echo Installing MeshCentral...
C:\Scripts\Software\RemoteAgent64-TCSE.exe -fullinstall
echo MeshCentral Installed...
echo Installing Office 2016...
C:\Scripts\Software\Office2016\setup.exe /adminfile C:\Scripts\Software\Office2016\TCSE.MSP
echo Office 2016 Installed...
:: Run Debloat Script
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Software\Win11Debloat\Win11Debloat.ps1" -Silent -Sysprep -RemoveApps -RemoveCommApps -RemoveW11Outlook -RemoveDevApps -RemoveGamingApps -DisableDVR -ClearStartAllUsers -DisableTelemetry -DisableBing -DisableSuggestions -DisableLockscreenTips -ShowKnownFileExt -TaskbarAlignLeft -ShowSearchIconTb -HideTaskview -HideChat -DisableWidgets -DisableCopilot -DisableRecall
::: Define Taskbar Layout Path
set "REG_FILES_DIR=C:\Scripts\StartLayouts"
::: Loop through each .reg file in the directory
for %%f in (%REG_FILES_DIR%\*.reg) do (
reg import "%%f"
)
echo Taskbar layout successfully imported...
:: Remove All Shortcuts from Public Desktop Folder
:: Set the path to the Public Desktop folder
set "PUBLIC_DESKTOP=%PUBLIC%\Desktop"
:: Counter for deleted shortcuts
set "deleted_count=0"
:: Check if the Public Desktop folder exists
if not exist "%PUBLIC_DESKTOP%" (
echo Error: Public Desktop folder not found.
exit /b 1
)
:: Remove all .lnk files from the Public Desktop
for %%F in ("%PUBLIC_DESKTOP%\*.lnk") do (
del "%%F"
if !errorlevel! equ 0 (
set /a "deleted_count+=1"
)
)
:: Display results
echo Deleted !deleted_count! shortcut(s) from the Public Desktop.
:: Copy Login Scripts to User Startup
echo Copying Login Scripts to All Users...
powershell Copy-Item 'C:\Scripts\TCSE-Login.vbs' 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup'
:: Restart System
echo Restarting system in 5 minutes...
timeout /t 300
shutdown /r /t 0