Updatet nun auch VSC Addons

This commit is contained in:
2023-06-10 23:23:12 +02:00
parent eef43b0274
commit 44da658d0b
2 changed files with 28 additions and 11 deletions

View File

@@ -111,7 +111,7 @@ function InstallSoftware {
Write-Host "Konfiguriere OOshutup10 bitte warten..." -ForegroundColor Blue
Try {
Write-Host "Versuche OOshutup10 config einzulesen..." -ForegroundColor Blue
./OOSU10.exe $HOME\.winconfig\configs\ooshutup10\ooshutup10.cfg /quiet
shutup10 $HOME\.winconfig\configs\ooshutup10\ooshutup10.cfg /quiet
Write-Host "OOshutup10 config erfolgreich eingelesen." -ForegroundColor Green
}
Catch {

View File

@@ -3,22 +3,39 @@ function allupdates {
Write-Host "Beginne mit dem Update aller Pakete..." -ForegroundColor Blue
winget upgrade --all
Remove-Item C:\Users\Public\Desktop\*.lnk
Write-Host "Ziehe aktuelle winconfig von git..." -ForegroundColor Blue
Set-Location $HOME/.winconfig ; git pull
Write-Host "Aktuallisiere AutoHokey Scripts ..." -ForegroundColor Blue
$sourceDir = "$HOME\.winconfig\configs\autohotkey"
$targetDir = "$HOME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
Get-ChildItem -Path $targetDir -Filter *.ahk -Recurse | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $sourceDir | ForEach-Object {
$linkPath = Join-Path $targetDir $_.Name
New-Item -ItemType SymbolicLink -Path $linkPath -Target $_.FullName -ErrorAction SilentlyContinue | Out-Null
}
Write-Host "Beginne mit dem Update von VSC Extensions..." -ForegroundColor Blue
$GetExtension = code --list-extensions
foreach ($extension in $GetExtension ) {
Write-Host "Suche Update nach Extension $extension ..." -ForegroundColor Blue
try {
if (code --install-extension $extension --force | Select-String -Pattern "is already installed.") {
Write-Host "Extension $extension bereits aktuell." -ForegroundColor Blue
}
else {
Write-Host "Extension $extension erfolgreich aktualisiert." -ForegroundColor Green
}
}
catch {
Write-Host "Probleme beim Update der Extension $extension" -ForegroundColor Red
}
}
if (Get-Module -ListAvailable -Name PSWindowsUpdate) {
Write-Host "Installiere Windows Updates..." -ForegroundColor Blue
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot
# ooshutup10 ausführen. Manchmal werden settings nach Windos updates zurückgesetzt
Write-Host "Spiele aktuelle OOSHUTUP10 config ein... " -ForegroundColor Blue
Set-Location $HOME/.winconfig ; ./OOSU10.exe configs/ooshutup10/ooshutup10.cfg /quiet
Write-Host "Ziehe aktuelle winconfig von git..." -ForegroundColor Blue
Set-Location $HOME/.winconfig ; git pull
Write-Host "Aktuallisiere AutoHokey Scripts ..." -ForegroundColor Blue
$sourceDir = "$HOME\.winconfig\configs\autohotkey"
$targetDir = "$HOME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
Get-ChildItem -Path $targetDir -Filter *.ahk -Recurse | Remove-Item -Force -ErrorAction SilentlyContinue
Get-ChildItem -Path $sourceDir | ForEach-Object {
$linkPath = Join-Path $targetDir $_.Name
New-Item -ItemType SymbolicLink -Path $linkPath -Target $_.FullName -ErrorAction SilentlyContinue | Out-Null
}
Write-Host "Update aller Powershell Module..." -ForegroundColor Blue
Write-Host -ForegroundColor Blue 'Get all PowerShell modules'
function Remove-OldPowerShellModules {