diff --git a/DeployTools/Deploy-FirstBoot.ps1 b/DeployTools/Deploy-FirstBoot.ps1 index f6a817f..8396c24 100644 --- a/DeployTools/Deploy-FirstBoot.ps1 +++ b/DeployTools/Deploy-FirstBoot.ps1 @@ -16,6 +16,9 @@ if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdent } } +#Disable Windows updates service +Set-Service -Name "wuauserv" -Status Stopped -StartupType Disabled + Write-Output "Checking activation status..." $ta = Get-CimInstance -ClassName SoftwareLicensingProduct -Filter "PartialProductKey IS NOT NULL" | Where-Object -Property Name -Like "Windows*" if ($ta.LicenseStatus -eq 1) {Write-Outpute-Output "Activation [OK]"} else {Write-Output "Activation [Error, Opening settings]";Start-Process "ms-settings:activation"; pause } @@ -30,6 +33,9 @@ Write-Output "Checking Chocolatey package updates" choco upgrade -y all Write-Output " Chocolatey updates [OK]" +#Enable Windows updates service +Set-Service -Name "wuauserv" -Status Stopped -StartupType Manual + Write-Output "Checking Windows updates" Import-Module PSWindowsUpdate Get-WUInstall -MicrosoftUpdate -AcceptAll -IgnoreReboot -IgnoreRebootRequired -Install diff --git a/InstallTools/Choco-PKGS.list b/InstallTools/Choco-PKGS.list index 772f9b7..477fe58 100644 --- a/InstallTools/Choco-PKGS.list +++ b/InstallTools/Choco-PKGS.list @@ -1 +1 @@ -7zip bulk-crap-uninstaller caesium.install firefox gimp handbrake inkscape libreoffice-fresh notepadplusplus paint.net pdfsam.install pnggauntlet.install vlc vscode.install xnconvert.install choco install googlechrome pswindowsupdate git \ No newline at end of file +7zip;caesium.install;firefox;gimp;handbrake;inkscape;libreoffice-fresh;notepadplusplus;paint.net;pdfsam.install;pnggauntlet.install;vlc;vscode.install;xnconvert.install;googlechrome;pswindowsupdate;git \ No newline at end of file diff --git a/InstallTools/Download-OandO-Tools.cmd b/InstallTools/Download-OandO-Tools.cmd index 27dc5c1..172e15b 100644 --- a/InstallTools/Download-OandO-Tools.cmd +++ b/InstallTools/Download-OandO-Tools.cmd @@ -9,7 +9,7 @@ REM # @author: Bram Prieshof # REM ################################################### PowerShell.exe "Invoke-WebRequest -UseBasicParsing -Uri https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe -OutFile C:\SysTools\InstallTools\OOSU10.exe; Invoke-WebRequest -UseBasicParsing -Uri https://dl5.oo-software.com/files/ooappbuster/OOAPB.exe -OutFile C:\SysTools\InstallTools\OOAPB.exe.exe" -echo Downlaod [OK] +echo Download [OK] pause diff --git a/InstallTools/Install-From-Choco-PKGSlist.cmd b/InstallTools/Install-From-Choco-PKGSlist.cmd index 3d81b52..8f33bea 100644 --- a/InstallTools/Install-From-Choco-PKGSlist.cmd +++ b/InstallTools/Install-From-Choco-PKGSlist.cmd @@ -14,9 +14,9 @@ NET SESSION >nul 2>&1 IF %ERRORLEVEL% EQU 0 ( echo Install packages listed in Choco-PKGS.list pause - PowerShell.exe "$content = [IO.File]::ReadAllText("C:\SysTools\InstallTools\Choco-PKGS.list"); choco install $content -y" + PowerShell.exe "$content = [IO.File]::ReadAllText('C:\SysTools\InstallTools\Choco-PKGS.list'); choco install $content -y" echo Chocolatey installed - pasue + pause ) ELSE ( echo Please run this script as administrator pause diff --git a/InstallTools/unblock-Tools.cmd b/InstallTools/unblock-Tools.cmd new file mode 100644 index 0000000..9791b27 --- /dev/null +++ b/InstallTools/unblock-Tools.cmd @@ -0,0 +1,14 @@ +@echo off + +REM ############################################################### +REM # @description: # +REM # Unblocks all files from this repo so SmartScreen is happy # +REM # # +REM # @project: IMGSystTools # +REM # @author: Bram Prieshof # +REM ############################################################### + +PowerShell.exe "dir -Path 'C:\SysTools' -Recurse | Unblock-File" + +echo Unblock [OK] +pause \ No newline at end of file diff --git a/ReadMe.md b/ReadMe.md index bb2d873..b785d30 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,5 @@ # SysTools ## Tools and scripts used for system image creation, maintainance and deployment -Files expected in of C:\SysTools \ No newline at end of file +Files expected in of C:\SysTools +First run InstallTools\Unblock-Tools.cmd to allow the scripts to run without trippig SmartScreen \ No newline at end of file