ReadMe angepasst.
This commit is contained in:
79
README.md
79
README.md
@@ -1,11 +1,10 @@
|
||||
# Winconfig
|
||||
|
||||

|
||||

|
||||
|
||||
Aktuelle Windows config. Analog zu meiner [zshconfig](https://git.susa.pw/Tim/zshconfig).
|
||||
Die Idee hinter diesem Script ist eine Windows 11 installation
|
||||
so zu konfingurieren wie ich es mag. Es werden Einstellungen
|
||||
am Explorer verändert, unnötige Software entfernt und nützliche Software installiert.
|
||||
so zu konfingurieren wie ich es mag. Windows wird konfiguriert, unnötige Software entfernt und nützliche Software installiert.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -16,79 +15,29 @@ Danach das repo clonen:
|
||||
Jetzt nach belieben die ExecutionPolicy setzen. Zum Beispiel:
|
||||
<code>Set-ExecutionPolicy Unrestricted</code>
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Das aufrufen der <code>install.ps1</code> öffnet ein Menü das verschiedene Optionen bietet.
|
||||
|
||||
### Remove unwanted
|
||||
### Remove Bloatware
|
||||
|
||||
Deinstalliert den default crap. Pakete können in dem Array <code>$toRemove</code> eingetragen werden.
|
||||
Deinstalliert alles mögliche an default bloatware.
|
||||
|
||||
### Installiere Software
|
||||
### Install Software
|
||||
|
||||
Hier wid Software installiert die auch auf jeden Windows Computer benutzen möchte. Am Ende der Installation
|
||||
startet das Programm [Shut Up Windows 10](https://www.oo-software.com/de/shutup10) damit ich es direkt konfigurieren kann.
|
||||
Diese Software kann im Array $toInstall angepasst werden.
|
||||
Bei diesem Schritt wird einiges an Software und konfiguriert.
|
||||
Es werden auch Standards wie das Termin konfiguriert:
|
||||
|
||||
### Installiere optionale Software
|
||||

|
||||
|
||||
Hier wird Software installiert, die nicht auf jeden Rechner den ich nutze installiert wird. Um flexibel zu bleiben fragt das Skript
|
||||
Zusätzlich werden diverse default Settings im Windows gesetzt.
|
||||
### Install Optional Software
|
||||
|
||||
Hier wird Software installiert die nicht auf jeden Rechner den ich nutze installiert wird. Um flexibel zu bleiben fragt das Skript
|
||||
bei jedem Tool einzeln nach ob eine Installation gewünsch ist oder nicht.
|
||||
Diese Software kann im Array $toInstallOpt angepasst werden.
|
||||
Es wird WSL mit Debian installiert. Falls diese Funktion benutzen werden soll muss
|
||||
zwingend ein Neustart durchgeführt werden.
|
||||
|
||||
### Konfiguriere Windows
|
||||
|
||||
Hier werden Windows Einstellungen modifiziert.
|
||||
- Ausgeblendete Dateien im Explorer anzeigen.
|
||||
- Dateinamen Erweiterungen im Explorer anzeigen.
|
||||
- Vollständigen Pfad im Explorer anzeigen.
|
||||
- Erweitertest Kontextmenü im Explorer.
|
||||
- Optionale Installation eines Powershell CMDlets um Windows Updates zu installieren.
|
||||
- Größe der Taskbar festlegen.
|
||||
|
||||
Außerdem wird die Datei config.ps1 als Terminal Startup geladen. Diese lädt direkt nach dem Start functions.ps1 und
|
||||
aliases.ps1. In der functions.ps1 können Powershell Funktionen hinterlegt werden die dann bei jedem Start verfügbar sind.
|
||||
In der aliases.ps1 können aliase für das Terminal hinterlegt werden. Diese Datei wird nach der functions.ps1 geladen
|
||||
damit die Funktionen aus dieser geladen werden können. So wird die Update funktion als Alias "update" hinzugefügt.
|
||||
Damit kann das komplette System geupdatet werden.
|
||||
|
||||
|
||||
### Update System
|
||||
|
||||
Dieser Programmpunkt updatet alle Winget Pakete, installiert alle Windows Updates und aktuallisert auch alle Powershell CMDlets.
|
||||
|
||||
## Nützliche commands
|
||||
|
||||
### Winget
|
||||
#### Logfiles
|
||||
<code>%LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir</code>
|
||||
Man kann <code>--verbose-logs</code> winget command hängen um detailiertere Logs zu erhalten.
|
||||
#### Zeige alle Software an
|
||||
<code>winget list </code>
|
||||
|
||||
## To do
|
||||
Noch ist dieses Repo nicht vollendet. Es fehlen noch folgende Fähigkeiten:
|
||||
|
||||
### Fehlende Software
|
||||
Es gibt eine Handvoll Software für die kein Winget Paket verfügbar ist. Die Gründe dafür sind unterschiedlich.
|
||||
- [Battl.net Client](https://www.blizzard.com/de-de/apps/battle.net/desktop)
|
||||
- [Filezilla Client](https://filezilla-project.org/index.php)
|
||||
- [MySQL Workbench](https://www.mysql.com/products/workbench/)
|
||||
- [MSI Afterburner](https://www.msi.com/Landing/afterburner/graphics-cards)
|
||||
|
||||
### Diverses
|
||||
- Prüfen ob Installationsort einzelner Software angepasst werden soll.
|
||||
- Falls winget irgendwann prüfen kann ob Software bereits installiert ist muss diese Abfrage angepasst werden.
|
||||
- Falls winget irgendwann Ergebnisse von Abfragen sauber in <code>Select-Object</code> abfragbar macht muss die Namensbildung angepasst werden.
|
||||
- Terminal hübsch machen. Für weitere Infos siehe [diesen Guide](https://dev.to/ansonh/customize-beautify-your-windows-terminal-2022-edition-541l).
|
||||
- Prüfen inwieweit es möglich ist die Settings von Software automatisiert anzupassen.
|
||||
- Anlage von aliases für das Terminal (update, modify).
|
||||
- Beim Starten vom Terminal Winfetch starten.
|
||||
- Winget Config syncen.
|
||||
|
||||
### Configure Windows
|
||||
|
||||
Hardening von Windows. Modiefizierte Version [von diesen](https://github.com/simeononsecurity/Windows-Optimize-Harden-Debloat) großartigen repo.
|
||||
|
||||
|
||||
|
||||
25
config.ps1
25
config.ps1
@@ -10,14 +10,13 @@ $toRemove = @('Clipchamp.Clipchamp_yxz26nhyzhsrt', 'Microsoft.549981C3F5F10_8wek
|
||||
|
||||
$toInstall = @('7zip.7zip', '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',
|
||||
'yt-dlp.yt-dlp'.'Audacity.Audacity', 'ffmpeg', 'OBSProject.OBSStudio')
|
||||
'yt-dlp.yt-dlp'.'Audacity.Audacity', 'ffmpeg')
|
||||
|
||||
$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', 'Microsoft.SQLServerManagementStudio', 'Soundboard', 'VMware.WorkstationPro')
|
||||
'Elgato.StreamDeck', 'REALiX.HWiNFO', '9P4CLT2RJ1RS', 'Microsoft.SQLServerManagementStudio', 'Soundboard', 'VMware.WorkstationPro', 'OBSProject.OBSStudio')
|
||||
|
||||
# Deinstalliert den Crap
|
||||
function RemoveSoftware {
|
||||
Read-Host "BLA"
|
||||
$wingetResult = New-Object System.Collections.Generic.List[System.Object]
|
||||
foreach ($utility in $toRemove) {
|
||||
Try {
|
||||
@@ -242,6 +241,15 @@ function InstallSoftware {
|
||||
}
|
||||
}
|
||||
Read-Host "Bitte das Terminal / Powershell neu starten damit die Aenderungen uebernommen werden."
|
||||
# Windows Explorer Einrichten
|
||||
New-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" -Value "" -Force
|
||||
Set-Itemproperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'Hidden' -value '00000001'
|
||||
Set-Itemproperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'HideFileExt' -value '00000000'
|
||||
Set-Itemproperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CabinetState' -Name 'FullPath' -value '00000001'
|
||||
Remove-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'TaskbarSi'
|
||||
New-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'TaskbarSi' -value '0000001' -PropertyType DWORD
|
||||
Write-Host "Starte Explorer neu um änderungen zu übernehmen"
|
||||
Get-Process explorer | Stop-Process
|
||||
|
||||
|
||||
|
||||
@@ -289,18 +297,9 @@ function InstallSoftwareOpt {
|
||||
}
|
||||
|
||||
# Funktion um Windows zu debloaten
|
||||
fucntion DebloatWindows {
|
||||
function DebloatWindows {
|
||||
Write-Host "Beginne das Windows zu debloaten und hardening auszuführen..." - -ForegroundColor Blue
|
||||
debloatwindows
|
||||
# Windows Explorer Einrichten
|
||||
New-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" -Value "" -Force
|
||||
Set-Itemproperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'Hidden' -value '00000001'
|
||||
Set-Itemproperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'HideFileExt' -value '00000000'
|
||||
Set-Itemproperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CabinetState' -Name 'FullPath' -value '00000001'
|
||||
Remove-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'TaskbarSi'
|
||||
New-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'TaskbarSi' -value '0000001' -PropertyType DWORD
|
||||
Write-Host "Starte Explorer neu um änderungen zu übernehmen"
|
||||
Get-Process explorer | Stop-Process
|
||||
}
|
||||
|
||||
# Funktion um zu prüfen ob die config Files schon vorhanden sind.
|
||||
|
||||
28
install.ps1
28
install.ps1
@@ -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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Grid Width="800" Height="600" Background="#6d6466">
|
||||
<Button Content="Remove Bloatware" HorizontalAlignment="Left" VerticalAlignment="Top" Width="300" Margin="30,100,0,0" Name="remove" Height="50" Background="#e3dbdb"/>
|
||||
<Button Content="Install Sofware" HorizontalAlignment="Right" VerticalAlignment="Top" Width="300" Margin="0,100,30,0" Name="install" Height="50" Background="#e3dbdb"/>
|
||||
<Button Content="Install Optional Software" HorizontalAlignment="Left" VerticalAlignment="Top" Width="300" Margin="30,201,0,0" Name="Installopt" Height="50" Background="#e3dbdb"/>
|
||||
<Button Content="Install Optional Software" HorizontalAlignment="Left" VerticalAlignment="Top" Width="300" Margin="30,201,0,0" Name="installopt" Height="50" Background="#e3dbdb"/>
|
||||
<Button Content="Configure Windows" HorizontalAlignment="Right" VerticalAlignment="Top" Width="300" Margin="0,200,30,0" Name="configure" Height="50" Background="#e3dbdb"/>
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Top" TextWrapping="Wrap" Text="Winconfig UI" Margin="0,17,0,0" Name="text" FontSize="32"/>
|
||||
</Grid></Window>
|
||||
Reference in New Issue
Block a user