From e0c029a6b11a3379c9c808281b211fbfdd0f124a Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 2 Jan 2023 19:53:30 +0100 Subject: [PATCH] Neue Aliase, neue Software etc. --- .gitignore | 1 + aliases.ps1 | 5 +++++ functions.ps1 | 11 ++++++----- install.ps1 | 38 ++++++++++++++++++++++++++++---------- 4 files changed, 40 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 99ab515..10bc5e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ test.* *.log .history/ +OOSU10.exe diff --git a/aliases.ps1 b/aliases.ps1 index 68a943f..b281f5f 100644 --- a/aliases.ps1 +++ b/aliases.ps1 @@ -12,6 +12,11 @@ function elevate { Start-Process powershell -Verb runAs -ArgumentList $arguments } +# Speichert das Youtube Video als mp3 im aktuellen Ordner +function ymp3 { + yt-dlp --extract-audio --audio-format mp3 --format "bestaudio" +} + # Startet das install Script Set-Alias -name install -value "~\.winconfig\install.ps1" diff --git a/functions.ps1 b/functions.ps1 index 13f458a..4e4e4e5 100644 --- a/functions.ps1 +++ b/functions.ps1 @@ -1,16 +1,17 @@ #Updatet all the things function Update { - Write-Host "Beginne mit dem Update aller Pakete..." + Write-Host "Beginne mit dem Update aller Pakete..." -ForegroundColor Blue # Winget upgrades ausführen winget upgrade --all remove-item ~\Desktop* -include *.lnk if (Get-Module -ListAvailable -Name PSWindowsUpdate) { - Write-Host "Installiere Windows Updates..." + Write-Host "Installiere Windows Updates..." -ForegroundColor Blue Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot # ooshutup10 ausführen. Manchmal werden settings nach Windos updates zurückgesetzt - ~/.winconfig/OOSU10.exe $HOME/.winconfig/ooshutup10/ooshutup10.cfg /quiet - Write-Host "Update aller Powershell Module..." - Write-Host -ForegroundColor Cyan 'Get all PowerShell modules' + Write-Host "Spiele aktuelle OOSHUTUP10 config ein... " -ForegroundColor Blue + Set-Location ~/.winconfig ; ./OOSU10.exe configs/ooshutup10/ooshutup10.cfg /quiet + Write-Host "Update aller Powershell Module..." -ForegroundColor Blue + Write-Host -ForegroundColor Blue 'Get all PowerShell modules' function Remove-OldPowerShellModules { param ( [string]$ModuleName, diff --git a/install.ps1 b/install.ps1 index bb79e9a..2bf6381 100644 --- a/install.ps1 +++ b/install.ps1 @@ -19,7 +19,6 @@ function CheckForLink ($Path) { } } - # Konfig für die prompts $choices = New-Object Collections.ObjectModel.Collection[Management.Automation.Host.ChoiceDescription] $choices.Add((New-Object Management.Automation.Host.ChoiceDescription -ArgumentList '&Yes')) @@ -32,9 +31,10 @@ $toRemove = @('Clipchamp.Clipchamp_yxz26nhyzhsrt', 'Microsoft.549981C3F5F10_8wek 'Microsoft.WindowsSoundRecorder_8wekyb3d8bbwe', 'Microsoft.WindowsAlarms_8wekyb3d8bbwe', 'Microsoft.YourPhone_8wekyb3d8bbwe', 'Microsoft.ZuneMusic_8wekyb3d8bbwe', 'Microsoft.ZuneVideo_8wekyb3d8bbwe', 'MicrosoftCorporationII.QuickAssist_8wekyb3d8bbwe', 'MicrosoftTeams_8wekyb3d8bbwe', 'MicrosoftTeams_8wekyb3d8bbwe', 'Microsoft.OneDrive', 'microsoft.windowscommunicationsapps_8wekyb3d8bbwe', 'CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc') $toInstall = @('mcmilk.7zip-zstd', 'VideoLAN.VLC', 'SumatraPDF.SumatraPDF', 'Microsoft.VisualStudioCode', 'Bitwarden.Bitwarden', 'Mozilla.Firefox', 'IrfanSkiljan.IrfanView', 'Microsoft.PowerToys', - 'Joplin.Joplin', 'WireGuard.WireGuard', 'Devolutions.RemoteDesktopManager', 'TeamViewer.TeamViewer', 'NickeManarin.ScreenToGif', 'JanDeDobbeleer.OhMyPosh', 'WiresharkFoundation.Wireshark', 'Famatech.AdvancedIPScanner') + 'Joplin.Joplin', 'WireGuard.WireGuard', 'Devolutions.RemoteDesktopManager', 'TeamViewer.TeamViewer', 'NickeManarin.ScreenToGif', 'JanDeDobbeleer.OhMyPosh', 'WiresharkFoundation.Wireshark', 'Famatech.AdvancedIPScanner', + 'yt-dlp.yt-dlp'.'Audacity.Audacity') $toInstallOpt = @('Element.Element', 'Discord.Discord', 'Corsair.iCUE.4', 'Valve.Steam', 'GOG.Galaxy', 'TeXstudio.TeXstudio', 'MiKTeX.MiKTeX', 'Citrix.Workspace', 'Nvidia.GeForceExperience', 'Mojang.MinecraftLauncher', - 'Elgato.StreamDeck', 'REALiX.HWiNFO', '9P4CLT2RJ1RS') + 'Elgato.StreamDeck', 'REALiX.HWiNFO', '9P4CLT2RJ1RS', 'Microsoft.SQLServerManagementStudio', 'Soundboard','VMware.WorkstationPro') # Menü konfiguration function Show-Menu { @@ -97,14 +97,14 @@ do { Try { winget install -e --id $utility --silent # Killt Programme die nach der Installation automatisch die UI starten. Ätzend! - if ($utility -eq 'Famatech.AdvancedIPScanner' ){ + if ($utility -eq 'Famatech.AdvancedIPScanner' ) { Start-Sleep -Seconds 5 - taskkill /IM advanced_ip_scanner.exe + taskkill /IM advanced_ip_scanner.exe | Out-Null } - elseif ($utility -eq 'Microsoft.PowerToys'){ + elseif ($utility -eq 'Microsoft.PowerToys') { Start-Sleep -Seconds 5 - taskkill /IM PowerToys.Settings.exe + taskkill /IM PowerToys.Settings.exe | Out-Null } } Catch { @@ -251,12 +251,30 @@ do { } '3' { foreach ($utility in $toInstallOpt) { - $ergebnis = winget list --id $utility + $ergebnis = winget list --id -e $utility if ($ergebnis -eq "Es wurde kein installiertes Paket gefunden, das den Eingabekriterien entspricht.") { $decision = $Host.UI.PromptForChoice("$utility", "Soll $utility installiert werden?" , $choices, 1) if ($decision -eq 0) { - Write-Host "Installiere $utility" - winget install -e --id $utility --silent + if (-Not $utility -eq 'Soundboard') { + Write-Host "Installiere $utility" + winget install -e --id $utility --silent + } + else { + Invoke-WebRequest -UseBasicParsing -Uri "https://www.leppsoft.com/soundpad/de/download/64/20230101-SZQED1RN/" ` + -UserAgent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0" ` + -Headers @{ + "Accept" = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8" + "Accept-Language" = "de,en-US;q=0.7,en;q=0.3" + "Accept-Encoding" = "gzip, deflate, br" + "Referer" = "https://www.leppsoft.com/soundpad/de/download/64/20230101-U1KGSLJC/Soundpad_x64-3.4.10.msi" + "Upgrade-Insecure-Requests" = "1" + "Sec-Fetch-Dest" = "document" + "Sec-Fetch-Mode" = "navigate" + "Sec-Fetch-Site" = "same-origin" + "Sec-Fetch-User" = "?1" + } + } + } } }