Fixed opt software
This commit is contained in:
23
config.ps1
23
config.ps1
@@ -257,21 +257,6 @@ function InstallSoftware {
|
|||||||
Write-Host "Fehler beim installieren des Powershell update Modul." -ForegroundColor Red
|
Write-Host "Fehler beim installieren des Powershell update Modul." -ForegroundColor Red
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# Powershell Modul für VMWare
|
|
||||||
if (Get-Module -ListAvailable -Name VMware.PowerCLI) {
|
|
||||||
Write-Hoste "VMWare Powershell Modul ist bereits installiert." -ForegroundColor Blue
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
Write-Host "Beginne mit der Insallation des VMWare Modul..." -ForegroundColor Blue
|
|
||||||
Try {
|
|
||||||
Install-Module -Name VMware.PowerCLI -Force
|
|
||||||
Write-Host "VMWare Modul erfolgreich installiert..." -ForegroundColor Green
|
|
||||||
}
|
|
||||||
Catch {
|
|
||||||
Write-Host "Fehler beim installieren des VMWare Modul." -ForegroundColor Red
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Read-Host "Bitte das Terminal / Powershell neu starten damit die Aenderungen uebernommen werden."
|
Read-Host "Bitte das Terminal / Powershell neu starten damit die Aenderungen uebernommen werden."
|
||||||
# Windows Explorer Einrichten
|
# Windows Explorer Einrichten
|
||||||
New-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" -Value "" -Force
|
New-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" -Value "" -Force
|
||||||
@@ -283,19 +268,17 @@ function InstallSoftware {
|
|||||||
Set-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer' -Name 'EnableAutoTray' -value '00000001' # Alle Tray Icons immer anzeigen
|
Set-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer' -Name 'EnableAutoTray' -value '00000001' # Alle Tray Icons immer anzeigen
|
||||||
Write-Host "Starte Explorer neu um änderungen zu übernehmen"
|
Write-Host "Starte Explorer neu um änderungen zu übernehmen"
|
||||||
Get-Process explorer | Stop-Process
|
Get-Process explorer | Stop-Process
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Funktion um optionale Software zu insatllieren
|
# Funktion um optionale Software zu insatllieren
|
||||||
function InstallSoftwareOpt {
|
function InstallSoftwareOpt {
|
||||||
foreach ($utility in $toInstallOpt) {
|
foreach ($utility in $toInstallOpt) {
|
||||||
$ergebnis = winget list --id -e $utility
|
$ergebnis = winget list --id -e $utility
|
||||||
|
$choices = "&Ja", "&Nein"
|
||||||
if ($ergebnis -eq "Es wurde kein installiertes Paket gefunden, das den Eingabekriterien entspricht.") {
|
if ($ergebnis -eq "Es wurde kein installiertes Paket gefunden, das den Eingabekriterien entspricht.") {
|
||||||
$decision = $Host.UI.PromptForChoice("$utility", "Soll $utility installiert werden?" , $choices, 1)
|
$decision = $Host.UI.PromptForChoice("Installiere Optionale Software", "Soll $utility installiert werden?", $choices, 0)
|
||||||
if ($decision -eq 0) {
|
if ($decision -eq 0) {
|
||||||
if (-Not $utility -eq 'Soundboard') {
|
if (-not ($utility -eq 'Soundboard')) {
|
||||||
Write-Host "Installiere $utility"
|
Write-Host "Installiere $utility"
|
||||||
winget install -e --id $utility --silent
|
winget install -e --id $utility --silent
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user