ReadMe angepasst.

This commit is contained in:
2023-02-11 09:35:54 +01:00
parent 844d76b311
commit 9eda7f744f
5 changed files with 43 additions and 95 deletions

View File

@@ -4,12 +4,13 @@ if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdenti
Start-Process powershell -Verb runAs -ArgumentList $arguments
Break
}
Set-Location $HOME/.winconfig
# Log starten
if ((Test-Path $HOME/.winconfig/logs) -eq $False){
New-Item $HOME/.winconfig/logs
New-Item $HOME/.winconfig/logs/
}
Start-Transcript -Path $HOME/.winconfig/logs/run.log
Start-Transcript -Path $HOME/.winconfig/logs/run.log | out-null
# Menü laden
$inputXML = Get-Content "menu\menu.xaml"
@@ -31,31 +32,30 @@ catch {
$xaml.SelectNodes("//*[@Name]") | ForEach-Object { Set-Variable -Name "WPF$($_.Name)" -Value $Form.FindName($_.Name) }
# Einbinden der debloat.ps1
. .\debloat.ps1
#. .\debloat.ps1
# 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'))
$choices.Add((New-Object Management.Automation.Host.ChoiceDescription -ArgumentList '&No'))
#$choices = New-Object Collections.ObjectModel.Collection[Management.Automation.Host.ChoiceDescription]
#$choices.Add((New-Object Management.Automation.Host.ChoiceDescription -ArgumentList '&Yes'))
#$choices.Add((New-Object Management.Automation.Host.ChoiceDescription -ArgumentList '&No'))
$WPFremove.Add_Click({
# Crap deinstallieren
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command Start-Transcript ~/.winconfig/logs/winget-remove.log -Append; . ./config.ps1 ; RemoveSoftware | Out-Host" -WindowStyle Normal
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command Start-Transcript ~/.winconfig/logs/winget-remove.log -Append | out-null; . ./config.ps1 ; RemoveSoftware | Out-Host" -WindowStyle Normal
})
$WPFinstall.Add_Click({
# Software installieren
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command Start-Transcript ~/.winconfig/logs/winget-install.log -Append; . ./config.ps1 ; InstallSoftware | Out-Host" -WindowStyle Normal
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command Start-Transcript ~/.winconfig/logs/winget-install.log -Append | out-null; . ./config.ps1 ; InstallSoftware | Out-Host" -WindowStyle Normal
})
$WPFinstallop.Add_Click({
$WPFinstallopt.Add_Click({
# Optionale Software installieren
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command Start-Transcript ~/.winconfig/logs/winget-installopt.log -Append; . ./config.ps1 ; InstallSoftwareOpt | Out-Host" -WindowStyle Normal
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command Start-Transcript ~/.winconfig/logs/winget-installopt.log -Append | out-null; . ./config.ps1 ; InstallSoftwareOpt | Out-Host" -WindowStyle Normal
})
$WPFinstallop.Add_Click({
# Optionale Software installieren
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command Start-Transcript ~/.winconfig/logs/winget-debloat.log -Append; . ./config.ps1 ; DebloatWindows | Out-Host" -WindowStyle Normal
$WPFconfigure.Add_Click({
# Windows debloating
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command Start-Transcript ~/.winconfig/logs/winget-debloat.log -Append | out-null; . ./config.ps1 ; DebloatWindows | Out-Host" -WindowStyle Normal
})
$Form.ShowDialog() | out-null
Stop-Transcript