Updatet nun auch VSC Addons
This commit is contained in:
@@ -111,7 +111,7 @@ function InstallSoftware {
|
|||||||
Write-Host "Konfiguriere OOshutup10 bitte warten..." -ForegroundColor Blue
|
Write-Host "Konfiguriere OOshutup10 bitte warten..." -ForegroundColor Blue
|
||||||
Try {
|
Try {
|
||||||
Write-Host "Versuche OOshutup10 config einzulesen..." -ForegroundColor Blue
|
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
|
Write-Host "OOshutup10 config erfolgreich eingelesen." -ForegroundColor Green
|
||||||
}
|
}
|
||||||
Catch {
|
Catch {
|
||||||
|
|||||||
@@ -3,22 +3,39 @@ function allupdates {
|
|||||||
Write-Host "Beginne mit dem Update aller Pakete..." -ForegroundColor Blue
|
Write-Host "Beginne mit dem Update aller Pakete..." -ForegroundColor Blue
|
||||||
winget upgrade --all
|
winget upgrade --all
|
||||||
Remove-Item C:\Users\Public\Desktop\*.lnk
|
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) {
|
if (Get-Module -ListAvailable -Name PSWindowsUpdate) {
|
||||||
Write-Host "Installiere Windows Updates..." -ForegroundColor Blue
|
Write-Host "Installiere Windows Updates..." -ForegroundColor Blue
|
||||||
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot
|
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot
|
||||||
# ooshutup10 ausführen. Manchmal werden settings nach Windos updates zurückgesetzt
|
# ooshutup10 ausführen. Manchmal werden settings nach Windos updates zurückgesetzt
|
||||||
Write-Host "Spiele aktuelle OOSHUTUP10 config ein... " -ForegroundColor Blue
|
Write-Host "Spiele aktuelle OOSHUTUP10 config ein... " -ForegroundColor Blue
|
||||||
Set-Location $HOME/.winconfig ; ./OOSU10.exe configs/ooshutup10/ooshutup10.cfg /quiet
|
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 "Update aller Powershell Module..." -ForegroundColor Blue
|
||||||
Write-Host -ForegroundColor Blue 'Get all PowerShell modules'
|
Write-Host -ForegroundColor Blue 'Get all PowerShell modules'
|
||||||
function Remove-OldPowerShellModules {
|
function Remove-OldPowerShellModules {
|
||||||
|
|||||||
Reference in New Issue
Block a user