2
0
tcse-deploy/TCSE-Computer-Deploy.bat
2024-12-11 08:33:54 -06:00

113 lines
4.5 KiB
Batchfile

@echo off
:: Install Office 2016
echo Installing Office 2016...
C:\Scripts\Software\Office2016\setup.exe /adminfile C:\Scripts\Software\Office2016\TCSE.MSP
echo Office 2016 Installed...
:: 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"
:: Install Google Chrome Enterprise & Accept Winget Terms
echo Installing Google Chrome...
:: C:\Users\Tech\AppData\Local\Microsoft\WindowsApps\winget.exe install Google.Chrome -h -s winget
winget install --exact --id Google.Chrome --silent --accept-source-agreements --accept-package-agreements
:: Install Google Cloud Provider for Windows
echo Installing Google Cloud Provider for Windows...
C:\Scripts\Software\gcpwstandaloneenterprise64.exe /silent /fullinstall
echo Google Cloud Provider for Windows Installed...
:: Install TCSE Remote MeshCentral
echo Installing TCSE Remote MeshCentral...
C:\Scripts\Software\RemoteAgent64-TCSE.exe -fullinstall
echo TCSE Remote MeshCentral Installed...
:: Install Google Drive
echo Installing Google Drive...
:: C:\Users\Tech\AppData\Local\Microsoft\WindowsApps\winget.exe install Google.GoogleDrive -h -s winget
winget install --exact --id Google.GoogleDrive --silent
:: Install VLC Media Player
echo Installing VLC Media Player...
:: C:\Users\Tech\AppData\Local\Microsoft\WindowsApps\winget.exe install VideoLAN.VLC -h -s winget
winget install --exact --id VideoLAN.VLC --silent
:: Install Zoom
echo Installing Zoom...
:: C:\Users\Tech\AppData\Local\Microsoft\WindowsApps\winget.exe install Zoom.Zoom -h -s winget
winget install --exact --id Zoom.Zoom --silent
:: Install Adobe Reader
echo Installing Adobe Reader...
:: C:\Users\Tech\AppData\Local\Microsoft\WindowsApps\winget.exe install Adobe.Acrobat.Reader.64-bit -h -s winget
winget install --exact --id Adobe.Acrobat.Reader.64-bit --silent
:: 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.
:: Install Google Cloud Provider for Windows - Second Time
:: echo Installing Google Cloud Provider for Windows Second Time...
:: C:\Scripts\Software\gcpwstandaloneenterprise64.exe /silent /fullinstall
:: echo Google Cloud Provider for Windows Installed Second Time...
:: Add Scheduled Tasks to Force GCPW Update
:: echo Run Google Updater...
:: powershell -ExecutionPolicy Bypass -File "C:\Scripts\GCPW\Run-Google-Updater.ps1"
:: echo Run Create First Boot Restart Task...
:: powershell -ExecutionPolicy Bypass -File "C:\Scripts\GCPW\First-Boot-Restart-Task.ps1"
:: Install Google Cloud Provider for Windows - Third Time
:: echo Installing Google Cloud Provider for Windows Second Time...
:: C:\Scripts\Software\gcpwstandaloneenterprise64.exe /silent /fullinstall
:: echo Google Cloud Provider for Windows Installed Third Time...
:: 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'
echo Successfully Copied Login Scripts...
:: Apply Local Group Policy
echo Adding Group Policy to All Users...
C:\Scripts\GroupPolicy\LGPO.exe /g C:\Scripts\GroupPolicy\
echo Successfully Applied Policy...
:: Restart System
echo Restarting system in 2.5 minutes...
timeout /t 150
shutdown /r /t 0