Fixed install and deploy tools

This commit is contained in:
2021-07-16 13:36:59 +02:00
parent ca328d118c
commit 4fe6fe40c5
6 changed files with 26 additions and 5 deletions

View File

@@ -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

View File

@@ -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
7zip;caesium.install;firefox;gimp;handbrake;inkscape;libreoffice-fresh;notepadplusplus;paint.net;pdfsam.install;pnggauntlet.install;vlc;vscode.install;xnconvert.install;googlechrome;pswindowsupdate;git

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -2,3 +2,4 @@
## Tools and scripts used for system image creation, maintainance and deployment
Files expected in of C:\SysTools
First run InstallTools\Unblock-Tools.cmd to allow the scripts to run without trippig SmartScreen