diff --git a/Autounattend/Custom-Scripts.txt b/Autounattend/Custom-Scripts.txt index ab844b8..6f675cf 100644 --- a/Autounattend/Custom-Scripts.txt +++ b/Autounattend/Custom-Scripts.txt @@ -5,13 +5,13 @@ curl -L https://gitea.tcse.us/tricounty/tcse-deploy/archive/main.zip --output C: # 2. PS1 Expand-Archive -Path 'C:\Scripts.zip' -DestinationPath 'C:\Scripts' -timeout /t 15 -Remove-Item -Path 'C:\Scripts.zip' +timeout /t 30 # 3. PS1 Move-Item -Path 'C:\Scripts\tcse-deploy\*' -Destination 'C:\Scripts' timeout /t 15 Remove-Item -Path 'C:\Scripts\tcse-deploy\' +Remove-Item -Path 'C:\Scripts.zip' # 4. CMD C:\Scripts\TCSE-Computer-Deploy.bat \ No newline at end of file diff --git a/Autounattend/Desktop/autounattend.xml b/Autounattend/Desktop/autounattend.xml index e5e9d4f..d29a375 100644 --- a/Autounattend/Desktop/autounattend.xml +++ b/Autounattend/Desktop/autounattend.xml @@ -1,6 +1,6 @@ - + @@ -393,8 +393,16 @@ $logfile = 'C:\Windows\Setup\Scripts\RemoveFeatures.log'; } } *>&1 >> $logfile; - -Remove-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband' -Name '*'; + +<LayoutModificationTemplate xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout" Version="1"> + <CustomTaskbarLayoutCollection PinListPlacement="Replace"> + <defaultlayout:TaskbarLayout> + <taskbar:TaskbarPinList> + <taskbar:DesktopApp DesktopApplicationLinkPath="#leaveempty" /> + </taskbar:TaskbarPinList> + </defaultlayout:TaskbarLayout> + </CustomTaskbarLayoutCollection> +</LayoutModificationTemplate> $json = '{"pinnedList":[]}'; @@ -520,11 +528,15 @@ curl -L https://gitea.tcse.us/tricounty/tcse-deploy/archive/main.zip --output C: Expand-Archive -Path 'C:\Scripts.zip' -DestinationPath 'C:\Scripts' -Remove-Item -Path 'C:\Scripts.zip' -Move-Item -Path 'C:\Scripts\tcse-deploy\*' -Destination 'C:\Scripts' -Remove-Item -Path 'C:\Scripts\tcse-deploy\' +timeout /t 30 - + +Move-Item -Path 'C:\Scripts\tcse-deploy\*' -Destination 'C:\Scripts' +timeout /t 15 +Remove-Item -Path 'C:\Scripts\tcse-deploy\' +Remove-Item -Path 'C:\Scripts.zip' + + C:\Scripts\TCSE-Computer-Deploy.bat @@ -564,6 +576,11 @@ $scripts = @( { net.exe accounts /maxpwage:UNLIMITED; }; + { + reg.exe add "HKLM\Software\Policies\Microsoft\Windows\Explorer" /v "StartLayoutFile" /t REG_SZ /d "C:\Windows\Setup\Scripts\TaskbarLayoutModification.xml" /f; + reg.exe add "HKLM\Software\Policies\Microsoft\Windows\Explorer" /v "LockedStartLayout" /t REG_DWORD /d 1 /f; + reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableCloudOptimizedContent" /t REG_DWORD /d 1 /f; + }; { Set-ExecutionPolicy -Scope 'LocalMachine' -ExecutionPolicy 'RemoteSigned' -Force; }; @@ -599,9 +616,6 @@ $scripts = @( { Get-AppxPackage -Name 'Microsoft.Windows.Ai.Copilot.Provider' | Remove-AppxPackage; }; - { - Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\TaskbarIcons.ps1' -Raw | Invoke-Expression; - }; { Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Search' -Name 'SearchboxTaskbarMode' -Type 'DWord' -Value 1; }; @@ -704,7 +718,10 @@ $scripts = @( Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\unattend-02.ps1' -Raw | Invoke-Expression; }; { - C:\Windows\Setup\Scripts\unattend-03.cmd; + Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\unattend-03.ps1' -Raw | Invoke-Expression; + }; + { + C:\Windows\Setup\Scripts\unattend-04.cmd; }; ); diff --git a/Autounattend/Laptop/autounattend.xml b/Autounattend/Laptop/autounattend.xml index 6c1756b..b153aa4 100644 --- a/Autounattend/Laptop/autounattend.xml +++ b/Autounattend/Laptop/autounattend.xml @@ -1,6 +1,6 @@ - + @@ -419,8 +419,16 @@ $logfile = 'C:\Windows\Setup\Scripts\RemoveFeatures.log'; </MSM> </WLANProfile> - -Remove-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband' -Name '*'; + +<LayoutModificationTemplate xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout" Version="1"> + <CustomTaskbarLayoutCollection PinListPlacement="Replace"> + <defaultlayout:TaskbarLayout> + <taskbar:TaskbarPinList> + <taskbar:DesktopApp DesktopApplicationLinkPath="#leaveempty" /> + </taskbar:TaskbarPinList> + </defaultlayout:TaskbarLayout> + </CustomTaskbarLayoutCollection> +</LayoutModificationTemplate> $json = '{"pinnedList":[]}'; @@ -546,11 +554,15 @@ curl -L https://gitea.tcse.us/tricounty/tcse-deploy/archive/main.zip --output C: Expand-Archive -Path 'C:\Scripts.zip' -DestinationPath 'C:\Scripts' -Remove-Item -Path 'C:\Scripts.zip' -Move-Item -Path 'C:\Scripts\tcse-deploy\*' -Destination 'C:\Scripts' -Remove-Item -Path 'C:\Scripts\tcse-deploy\' +timeout /t 30 - + +Move-Item -Path 'C:\Scripts\tcse-deploy\*' -Destination 'C:\Scripts' +timeout /t 15 +Remove-Item -Path 'C:\Scripts\tcse-deploy\' +Remove-Item -Path 'C:\Scripts.zip' + + C:\Scripts\TCSE-Computer-Deploy.bat @@ -597,6 +609,11 @@ $scripts = @( { net.exe accounts /maxpwage:UNLIMITED; }; + { + reg.exe add "HKLM\Software\Policies\Microsoft\Windows\Explorer" /v "StartLayoutFile" /t REG_SZ /d "C:\Windows\Setup\Scripts\TaskbarLayoutModification.xml" /f; + reg.exe add "HKLM\Software\Policies\Microsoft\Windows\Explorer" /v "LockedStartLayout" /t REG_DWORD /d 1 /f; + reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableCloudOptimizedContent" /t REG_DWORD /d 1 /f; + }; { Set-ExecutionPolicy -Scope 'LocalMachine' -ExecutionPolicy 'RemoteSigned' -Force; }; @@ -632,9 +649,6 @@ $scripts = @( { Get-AppxPackage -Name 'Microsoft.Windows.Ai.Copilot.Provider' | Remove-AppxPackage; }; - { - Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\TaskbarIcons.ps1' -Raw | Invoke-Expression; - }; { Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Search' -Name 'SearchboxTaskbarMode' -Type 'DWord' -Value 1; }; @@ -737,7 +751,10 @@ $scripts = @( Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\unattend-02.ps1' -Raw | Invoke-Expression; }; { - C:\Windows\Setup\Scripts\unattend-03.cmd; + Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\unattend-03.ps1' -Raw | Invoke-Expression; + }; + { + C:\Windows\Setup\Scripts\unattend-04.cmd; }; ); diff --git a/Patches/Windows/Update-TCSE-Deploy.bat b/Patches/Windows/Update-TCSE-Deploy.bat new file mode 100644 index 0000000..b6eb6e4 --- /dev/null +++ b/Patches/Windows/Update-TCSE-Deploy.bat @@ -0,0 +1,18 @@ +# Download TCSE Deploy Archive +curl -L https://gitea.tcse.us/tricounty/tcse-deploy/archive/main.zip --output C:\Scripts.zip + +# Extract Archive to C:\Scripts & Remove Zip +powershell Expand-Archive -Path 'C:\Scripts.zip' -DestinationPath 'C:\Scripts' +timeout /t 30 + +# Cleanup Archive +Move-Item -Path 'C:\Scripts\tcse-deploy\*' -Destination 'C:\Scripts' +timeout /t 15 + +# Remove Leftovers +powershell Remove-Item -Path 'C:\Scripts.zip' +powershell Remove-Item -Path 'C:\Scripts\tcse-deploy' +powershell Remove-Item -Path 'C:\Scripts\Software\Office2016' +powershell Remove-Item -Path 'C:\Scripts\Software\RemoteAgent64-TCSE.exe' +powershell Remove-Item -Path 'C:\Scripts\Software\gcpwstandaloneenterprise64.exe' +powershell Remove-Item -Path 'C:\Scripts\Autounattend'