2
0
tcse-deploy/TCSE-Computer-Deploy.bat

115 lines
4.8 KiB
Batchfile

@echo off
:: Set PowerOptions so the PC will not go to sleep during the script
Powercfg /x -standby-timeout-ac 0
:: Set PowerOptions so the monitor will not go off
powercfg -change -monitor-timeout-ac 0
:: 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"
:: Disable UAC to Allow for Winget Installs
powershell Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name EnableLUA -Value 0 -Force
:: Install Google Chrome Enterprise & Accept Winget Terms
echo Installing Google Chrome...
winget install --exact --id Google.Chrome --silent --accept-source-agreements --accept-package-agreements --force
:: 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...
winget install --exact --id Google.GoogleDrive --silent
:: Install VLC Media Player
echo Installing VLC Media Player...
winget install --exact --id VideoLAN.VLC --silent
:: Install ImageGlass Image Viewer
echo Installing ImageGlass...
winget install --exact --id Microsoft.DotNet.DesktopRuntime.8
winget install --exact --id Microsoft.EdgeWebView2Runtime
winget install --exact --id DuongDieuPhap.ImageGlass --silent
powershell Copy-Item 'C:\Scripts\Patches\ImageGlass\igconfig.admin.json' 'C:\Program Files\ImageGlass'
:: 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
:: Install Zoom
echo Installing Zoom...
winget install --exact --id Zoom.Zoom --silent
:: Install Adobe Reader
echo Installing Adobe Reader...
winget install --exact --id Adobe.Acrobat.Reader.64-bit --silent
:: Enable UAC
powershell Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name EnableLUA -Value 1 -Force
:: Import Registry Changes
echo Importing Registry Changes...
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Patches\Windows\Import-Registry-Changes.ps1"
echo Registry Changes Imported...
:: Delete Shortcuts from Public Desktop Folder
echo Deleting Shortcuts from Public Desktop Folder...
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Patches\Windows\Delete-Public-Shortcuts.ps1"
echo Shortcuts Have Been Deleted...
:: GCPW Add Allowed Domain to Registry
echo Adding Domain to GCPW Registry...
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Patches\GCPW\GCPW-AllowDomains.ps1"
echo Allowed Domain Added to Registry...
:: Apply Local Group Policy
echo Adding Group Policy to All Users...
C:\Scripts\Patches\GroupPolicy\LGPO.exe /g C:\Scripts\Patches\GroupPolicy\
echo Successfully Applied Policy...
:: 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...
:: Add Scheduled Tasks
echo Adding Scheduled Tasks to the System...
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Patches\Windows\Add-System-Sched-Task.ps1"
echo Successfully Added System Scheduled Task at Login for All Users...
:: Remove Leftovers
powershell Remove-Item -Path 'C:\Scripts\Software\Office2016' -Recurse -Force
powershell Remove-Item -Path 'C:\Scripts\Software\RemoteAgent64-TCSE.exe'
powershell Remove-Item -Path 'C:\Scripts\Software\gcpwstandaloneenterprise64.exe'
:: Set Scripts Folder to Hidden
echo Hiding Scripts Folder...
powershell Set-ItemProperty -Path "C:\Scripts" -Name Attributes -Value "Hidden"
:: Perform Windows Updates
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Patches\Windows\Initial-Windows-Updates.ps1"
:: Set PowerOptions so the PC will sleep after 60 minutes
Powercfg /x -standby-timeout-ac 60
:: Set PowerOptions so the monitor will go off after 15 minutes
powercfg -change -monitor-timeout-ac 15
:: Restart System
echo Restarting system in 2.5 minutes...
timeout /t 150
shutdown /r /t 0