Ne Menge hinzugefügt.

This commit is contained in:
2023-01-04 19:30:40 +01:00
parent e0c029a6b1
commit a33ae71ee8
7 changed files with 1428 additions and 15 deletions

2
.gitignore vendored
View File

@@ -1,4 +1,4 @@
test.*
test*
*.log
.history/
OOSU10.exe

View File

@@ -7,16 +7,14 @@ function edit {
function space {
Get-CimInstance -ClassName Win32_LogicalDisk | Select-Object -Property DeviceID,@{'Name' = 'FreeSpace (GB)'; Expression= { [int]($_.FreeSpace / 1GB) }}
}
# Powershell als Admin neu starten
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"
yt-dlp --extract-audio --audio-format mp3 --format "bestaudio" -ffmpeg-location "C:\Program Files\ffmpeg\ffmpeg.exe"
}
# Update
function update {
Start-Process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -Verb RunAs -ArgumentList "-command allupdates | Out-Host" -Wait -WindowStyle Normal
}
# Startet das install Script
Set-Alias -name install -value "~\.winconfig\install.ps1"

1389
debloat.ps1 Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,16 @@
#Updatet all the things
function Update {
function allupdates {
Write-Host "Beginne mit dem Update aller Pakete..." -ForegroundColor Blue
# Winget upgrades ausführen
winget upgrade --all
remove-item ~\Desktop* -include *.lnk
Remove-Item C:\Users\Public\Desktop\*.lnk
if (Get-Module -ListAvailable -Name PSWindowsUpdate) {
Write-Host "Installiere Windows Updates..." -ForegroundColor Blue
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot
# ooshutup10 ausführen. Manchmal werden settings nach Windos updates zurückgesetzt
Write-Host "Spiele aktuelle OOSHUTUP10 config ein... " -ForegroundColor Blue
Set-Location ~/.winconfig ; ./OOSU10.exe configs/ooshutup10/ooshutup10.cfg /quiet
Write-Host "Ziehe aktuelle winconfig von git..." -ForegroundColor Blue
git -C ~\.winconfig pull
Write-Host "Update aller Powershell Module..." -ForegroundColor Blue
Write-Host -ForegroundColor Blue 'Get all PowerShell modules'
function Remove-OldPowerShellModules {

View File

@@ -1,6 +1,9 @@
# Log starten
Start-Transcript -Path $HOME/.winconfig/run.log
# Einbinden der debloat.ps1
. .\debloat.ps1
## Fragt nach Admin Rechten.
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
$arguments = "& '" + $myinvocation.mycommand.definition + "'"
@@ -30,9 +33,9 @@ $toRemove = @('Clipchamp.Clipchamp_yxz26nhyzhsrt', 'Microsoft.549981C3F5F10_8wek
'Microsoft.PowerAutomateDesktop_8wekyb3d8bbwe', 'Microsoft.Todos_8wekyb3d8bbwe', 'Microsoft.Windows.Photos_8wekyb3d8bbwe', 'Microsoft.WindowsMaps_8wekyb3d8bbwe',
'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',
$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')
'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')
@@ -106,6 +109,18 @@ do {
Start-Sleep -Seconds 5
taskkill /IM PowerToys.Settings.exe | Out-Null
}
elseif ($utility -eq 'ffmpeg'){
Write-Host "Installiere ffmpeg..." -ForegroundColor Blue
try {
curl.exe -L https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-essentials.7z -o ~/.winconfig/ffmpeg.7z
& "C:\Program Files\7-Zip\7z.exe" e ~/.winconfig/ffmpeg.7z -o"c:\Program Files\ffmpeg\"
Remove-Item ~/.winconfig/ffmpeg.7z
Write-Host "ffmpeg wurde erfolgreich installiert." -ForegroundColor Green
}
catch {
Write-Host "Es ist ein Fehler bei der Installation von ffmpeg auftreten. Bitte das Log durchsuchen." -ForegroundColor Red
}
}
}
Catch {
Write-Host "Paket $utility konnte nicht installiert werden. " -ForegroundColor Red
@@ -130,7 +145,7 @@ do {
}
Write-Host "Richte Powershell und Terminal ein..." -ForegroundColor Blue
# Fonts installieren.
$LocalPath = "~/.winconfig/Fonts/"
$LocalPath = "~/.winconfig/fonts/"
$FONTS = 0x14
$objShell = New-Object -ComObject Shell.Application
$objFolder = $objShell.Namespace($FONTS)
@@ -287,6 +302,7 @@ do {
Read-Host "Computer muss neugestartet werden!"
}
} '4' {
Write-Host "Beginne das Windows zu debloaten und hardening auszuführen..." - -ForegroundColor Blue
# 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'

9
menu/menu.xaml Normal file
View File

@@ -0,0 +1,9 @@
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Width="800" Height="400">
<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="554.5,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="Configure Windows" HorizontalAlignment="Right" VerticalAlignment="Top" Width="300" Margin="500,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"/>
<Button Content="Fix Clipboard " HorizontalAlignment="Left" VerticalAlignment="Top" Width="100" Height="30" Margin="352.5,297,0,0" Name="Fix" Background="#e3dbdb"/>
</Grid></Window>