#Requires -Version 5.1 <# .SYNOPSIS KelTweak v1.1 — Windows Gaming Optimization Script .DESCRIPTION Anti-cheat safe (Vanguard, EAC, BattlEye) Windows gaming optimization. Geri alinabilir — restore modu dahil. Win11 25H2 (Build 26200) dogrulanmistir. .PARAMETER Mode apply : Tweakleri uygula (varsayilan) restore : Son yedekten geri al .EXAMPLE .\KelTweak.ps1 .\KelTweak.ps1 -Mode restore KelTweak.bat restore #> param( [string]$Mode = "apply" ) # ============================================================== # BOLUM 0 — ADMIN YETKİ KONTROLU # ============================================================== $_principal = [Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent() $_isAdmin = $_principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) $_isWebMode = [string]::IsNullOrEmpty($PSCommandPath) # irm | iex ile calisiyorsa true $_webUrl = "https://keltweaker.kelvpn.org" # --- Admin yetkisi kontrolu --- if (-not $_isAdmin) { Write-Host "" Write-Host " [!] Yonetici yetkisi gerekiyor. Yukseltiliyor..." -ForegroundColor Yellow if ($_isWebMode) { # Web modu: URL'yi tekrar indirip admin olarak calistir $cmd = "iex(irm '$_webUrl')" $encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($cmd)) Start-Process powershell.exe -Verb RunAs ` -ArgumentList "-NoProfile -ExecutionPolicy Bypass -STA -EncodedCommand $encoded" } else { # Dosya modu: ayni dosyayi admin olarak calistir Start-Process powershell.exe -Verb RunAs ` -ArgumentList "-NoProfile -ExecutionPolicy Bypass -STA -File `"$PSCommandPath`" -Mode `"$Mode`"" } exit 0 } # --- STA modu kontrolu (WPF GUI icin zorunlu) --- $_sta = [System.Threading.Thread]::CurrentThread.ApartmentState if ($_sta -ne [System.Threading.ApartmentState]::STA) { if ($_isWebMode) { $cmd = "iex(irm '$_webUrl')" $encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($cmd)) Start-Process powershell.exe ` -ArgumentList "-NoProfile -ExecutionPolicy Bypass -STA -EncodedCommand $encoded" } else { Start-Process powershell.exe ` -ArgumentList "-NoProfile -ExecutionPolicy Bypass -STA -File `"$PSCommandPath`" -Mode `"$Mode`"" } exit 0 } # ============================================================== # BOLUM 1 — KONSOL AYARLARI & GLOBAL DEGISKENLER # ============================================================== $OutputEncoding = [System.Text.Encoding]::UTF8 [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 $Host.UI.RawUI.WindowTitle = "KelTweak v1.1" $ProgressPreference = 'SilentlyContinue' # Checkpoint-Computer mavi bildirimini engelle # Pencere boyutu ayarla (bazi terminallerde calismayabilir, atla) # Windows Terminal'de (WT_SESSION) boyut zorlamak reflow sorunlarina yol acar if (-not $env:WT_SESSION) { try { $Host.UI.RawUI.WindowSize = New-Object System.Management.Automation.Host.Size(104, 46) } catch {} } # Calisma dizini ve dosya yollari $script:KT_Dir = if ($PSScriptRoot -and $PSScriptRoot -ne "") { $PSScriptRoot } else { # Web modu (irm | iex): dosyalari Desktop\KelTweak klasorune kaydet $dsk = [Environment]::GetFolderPath("Desktop") $webDir = Join-Path $dsk "KelTweak" New-Item -ItemType Directory -Path $webDir -Force -ErrorAction SilentlyContinue | Out-Null $webDir } $script:KT_Stamp = Get-Date -Format "yyyyMMdd_HHmmss" $script:KT_LogPath = Join-Path $script:KT_Dir "KelTweak_Log_$($script:KT_Stamp).txt" $script:KT_BackupPath = Join-Path $script:KT_Dir "KelTweak_Backup_$($script:KT_Stamp).reg" $script:KT_NewKeysPath = Join-Path $script:KT_Dir "KelTweak_NewKeys_$($script:KT_Stamp).txt" # Log dosyasini baslat "KelTweak v1.1 | Baslangi: $(Get-Date) | Mode: $Mode`n$('=' * 60)" | Out-File $script:KT_LogPath -Encoding UTF8 -ErrorAction SilentlyContinue # ============================================================== # BOLUM 2 — YARDIMCI FONKSIYONLAR # ============================================================== # -- UI -- function Write-KT-Header { param([string]$Text) $line = "=" * 68 Write-Host "" Write-Host $line -ForegroundColor DarkCyan Write-Host " $Text" -ForegroundColor Cyan Write-Host $line -ForegroundColor DarkCyan Write-Host "" } function Write-KT-Section { param([string]$Text) Write-Host "" Write-Host " >> $Text" -ForegroundColor DarkYellow Write-Host " $('-' * 54)" -ForegroundColor DarkGray } function Write-KT-Status { <# .SYNOPSIS Tweak durum satiri yazdirir. OK=yesil, SKIP=gri, FAIL=kirmizi, WARN=sari #> param( [string]$Name, [ValidateSet("OK","SKIP","FAIL","WARN")] [string]$Status, [string]$Detail = "" ) $padded = $Name.PadRight(48) switch ($Status) { "OK" { Write-Host " [OK] " -NoNewline -ForegroundColor Green Write-Host $padded -NoNewline -ForegroundColor Gray } "SKIP" { Write-Host " [--] " -NoNewline -ForegroundColor DarkGray Write-Host $padded -NoNewline -ForegroundColor DarkGray } "FAIL" { Write-Host " [!!] " -NoNewline -ForegroundColor Red Write-Host $padded -NoNewline -ForegroundColor Gray } "WARN" { Write-Host " [**] " -NoNewline -ForegroundColor Yellow Write-Host $padded -NoNewline -ForegroundColor Gray } } if ($Detail) { Write-Host " $Detail" -ForegroundColor DarkGray } else { Write-Host "" } Write-KT-Log -Level $Status -Message "$Name | $Detail" } function Write-KT-Banner { param([string]$Text, [string]$Color = "Yellow") $line = "!" * 68 Write-Host "" Write-Host $line -ForegroundColor $Color Write-Host " $Text" -ForegroundColor $Color Write-Host $line -ForegroundColor $Color Write-Host "" } # -- Logging -- function Write-KT-Log { param( [string]$Level = "INFO", [string]$Message = "" ) $ts = Get-Date -Format "HH:mm:ss.fff" "[$ts][$($Level.PadRight(4))] $Message" | Out-File $script:KT_LogPath -Append -Encoding UTF8 -ErrorAction SilentlyContinue } # -- Registry Altyapisi -- # Hangi key yollari yedeklendi (duplicate export onleme) $script:KT_BackedPaths = [System.Collections.Generic.HashSet[string]]::new([StringComparer]::OrdinalIgnoreCase) # Script tarafindan YARATILAN (yokken olusturulan) key'ler — restore'da silinecek $script:KT_NewKeys = [System.Collections.Generic.List[string]]::new() # Reboot gerektiren tweak ID'leri $script:KT_RebootList = [System.Collections.Generic.List[string]]::new() # Uygulanan tweak sayaci (ozet icin) $script:KT_Applied = 0 $script:KT_Skipped = 0 $script:KT_Failed = 0 function Convert-PsPathToReg { # HKLM:\Foo\Bar veya Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Foo\Bar # -> HKEY_LOCAL_MACHINE\Foo\Bar param([string]$PsPath) return $PsPath ` -replace "^Microsoft\.PowerShell\.Core\\Registry::", "" ` -replace "^HKLM:\\", "HKEY_LOCAL_MACHINE\" ` -replace "^HKCU:\\", "HKEY_CURRENT_USER\" ` -replace "^HKU:\\", "HKEY_USERS\" ` -replace "^HKCR:\\", "HKEY_CLASSES_ROOT\" ` -replace "/", "\" } function Backup-KT-Key { <# Bir registry key yolunu, henuz yedeklenmemisse, .reg backup dosyasina export eder. Key mevcut degilse (yeni olusturulacaksa) new_keys listesine ekler. #> param([string]$PsPath) if ($script:KT_BackedPaths.Contains($PsPath)) { return } [void]$script:KT_BackedPaths.Add($PsPath) $regPath = Convert-PsPathToReg -PsPath $PsPath # Key yoksa — yeni key, restore'da silinecek if (-not (Test-Path $PsPath)) { [void]$script:KT_NewKeys.Add($regPath) Write-KT-Log -Level "BAK" -Message "NEW_KEY (yoktu, olusturulacak): $regPath" return } # Mevcut key'i gecici dosyaya export et, sonra ana backup dosyasina birlestir $tmpFile = [System.IO.Path]::GetTempFileName() try { & reg.exe export "$regPath" "$tmpFile" /y 2>&1 | Out-Null if (-not (Test-Path $tmpFile)) { return } if ((Get-Item $tmpFile).Length -lt 10) { return } $raw = Get-Content -Path $tmpFile -Raw -Encoding Unicode if (-not (Test-Path $script:KT_BackupPath)) { # Ilk export: header dahil yaz $raw | Out-File $script:KT_BackupPath -Encoding Unicode -NoNewline } else { # Sonraki: header satirini kaldirip ekle $stripped = $raw -replace "^Windows Registry Editor Version 5\.00\r?\n(\r?\n)?", "" $stripped | Out-File $script:KT_BackupPath -Append -Encoding Unicode -NoNewline } Write-KT-Log -Level "BAK" -Message "EXPORTED: $regPath" } finally { Remove-Item $tmpFile -ErrorAction SilentlyContinue } } function Set-Reg { <# .SYNOPSIS Registry degeri yazar. Once backup alir. Basarida $true doner. .PARAMETER Type DWord | String | ExpandString | Binary | QWord | MultiString .PARAMETER Reboot Bu tweak icin reboot gerekiyorsa ekle .PARAMETER Id Reboot listesine eklenecek tweak ID'si #> param( [string]$Path, [string]$Name, [object]$Value, [string]$Type = "DWord", [string]$Id = "", [switch]$Reboot ) try { Backup-KT-Key -PsPath $Path if (-not (Test-Path $Path)) { New-Item -Path $Path -Force -ErrorAction Stop | Out-Null } Set-ItemProperty -Path $Path -Name $Name -Value $Value -Type $Type -Force -ErrorAction Stop if ($Reboot -and $Id -and (-not $script:KT_RebootList.Contains($Id))) { [void]$script:KT_RebootList.Add($Id) } Write-KT-Log -Level "SET " -Message "$Path | $Name = $Value [$Type]" return $true } catch { Write-KT-Log -Level "ERR " -Message "Set-Reg FAIL | $Path | $Name | $($_.Exception.Message)" return $false } } function Remove-Reg { <# .SYNOPSIS Registry degerini siler (key degil, sadece value). Once backup alir. #> param( [string]$Path, [string]$Name ) try { Backup-KT-Key -PsPath $Path if (Test-Path $Path) { Remove-ItemProperty -Path $Path -Name $Name -Force -ErrorAction SilentlyContinue } Write-KT-Log -Level "DEL " -Message "$Path | $Name" return $true } catch { Write-KT-Log -Level "ERR " -Message "Remove-Reg FAIL | $Path | $Name | $($_.Exception.Message)" return $false } } function Disable-KT-Service { # $null = SKIP (servis yok) | $false = FAIL | $true = OK # Stop-Service bazi kernel driver'larda (NetBT, rdbss vs.) asmaya neden olur. # Bu yuzden Stop islemi ayri bir background job'da 5 saniye timeout ile calistirilir. param([string]$ServiceName) $svc = Get-Service -Name $ServiceName -ErrorAction SilentlyContinue | Select-Object -First 1 if (-not $svc) { Write-KT-Log -Level "SKIP" -Message "Service bulunamadi (normal): $ServiceName" return $null } try { Set-Service -Name $svc.Name -StartupType Disabled -ErrorAction Stop # Stop-Service'i background job ile calistir; 5s sonra zorla sonlandir $job = Start-Job -ScriptBlock { param($sn) Stop-Service -Name $sn -Force -ErrorAction SilentlyContinue 2>&1 | Out-Null } -ArgumentList $svc.Name $null = Wait-Job -Job $job -Timeout 5 Remove-Job -Job $job -Force -ErrorAction SilentlyContinue Write-KT-Log -Level "SVC " -Message "DISABLED: $($svc.Name)" return $true } catch { Write-KT-Log -Level "ERR " -Message "Disable-Service FAIL | $($svc.Name) | $($_.Exception.Message)" return $false } } function Disable-KT-Task { param([string]$TaskPath, [string]$TaskName = "") try { if ($TaskName) { Disable-ScheduledTask -TaskPath $TaskPath -TaskName $TaskName -ErrorAction Stop | Out-Null } else { # TaskPath tam yol oldugunda (separator iceriyorsa) isle $parts = $TaskPath -split "\\" | Where-Object { $_ } $tName = $parts[-1] $tPath = "\" + ($parts[0..($parts.Count - 2)] -join "\") + "\" Disable-ScheduledTask -TaskPath $tPath -TaskName $tName -ErrorAction Stop | Out-Null } Write-KT-Log -Level "TSK " -Message "DISABLED task: $TaskPath $TaskName" return $true } catch { Write-KT-Log -Level "SKIP" -Message "Task bulunamadi / zaten devre disi: $TaskPath $TaskName" return $false } } # ============================================================== # BOLUM 3 — SİSTEM TESPİTİ # ============================================================== Write-KT-Header "KelTweak v1.1 Sistem Tespiti" # Laptop: pil varsa laptop $isLaptop = ($null -ne (Get-WmiObject Win32_Battery -ErrorAction SilentlyContinue)) # CPU $_cpu = Get-WmiObject Win32_Processor -ErrorAction SilentlyContinue | Select-Object -First 1 $cpuName = if ($_cpu -and $_cpu.Name) { $_cpu.Name.Trim() } else { "Tespit edilemedi" } $cpuVendor = if ($_cpu -and ($_cpu.Manufacturer -match "AMD")) { "AMD" } else { "Intel" } # GPU — Microsoft/Virtual/Remote gibi sahte adaptorleri filtrele $_gpuAll = @(Get-WmiObject Win32_VideoController -ErrorAction SilentlyContinue) $_gpuMain = $_gpuAll | Where-Object { $_.Name -notmatch "Microsoft|Virtual|Basic|Remote|RDP" } | Select-Object -First 1 $gpuName = if ($_gpuMain) { $_gpuMain.Name.Trim() } else { "Bilinmiyor" } $hasNVIDIA = ($null -ne ($_gpuAll | Where-Object { $_.Name -match "NVIDIA" } | Select-Object -First 1)) $hasAMD_GPU = ($null -ne ($_gpuAll | Where-Object { $_.Name -match "AMD|Radeon" } | Select-Object -First 1)) # OS $_winos = Get-WmiObject Win32_OperatingSystem -ErrorAction SilentlyContinue $winBuild = [int]$_winos.BuildNumber $isWin11 = ($winBuild -ge 22000) $winEdition = $_winos.Caption $isEnterprise = ($winEdition -match "Enterprise|Education") # RAM $ramGB = [math]::Round((Get-WmiObject Win32_ComputerSystem).TotalPhysicalMemory / 1GB) # SSD tespiti: C: surucusunun fiziksel disk turune bak # NOT: Get-Disk.MediaType NVMe SSD'lerde "Unspecified" donebilir. # Get-PhysicalDisk daha guvenilir + BusType=NVMe kontrolu eklendi. $osDriveSSD = $false try { $_cPart = Get-Partition -ErrorAction Stop | Where-Object { $_.DriveLetter -eq 'C' } | Select-Object -First 1 if ($_cPart) { $_ph = Get-PhysicalDisk -ErrorAction SilentlyContinue | Where-Object { $_.DeviceId -eq [string]$_cPart.DiskNumber } | Select-Object -First 1 if ($_ph) { $osDriveSSD = ($_ph.MediaType -eq "SSD") -or ($_ph.BusType -eq "NVMe") } else { $_cDisk = Get-Disk -Number $_cPart.DiskNumber -ErrorAction Stop $osDriveSSD = ($_cDisk.MediaType -eq "SSD") -or ($_cDisk.BusType -eq "NVMe") } } } catch { try { $bootDisk = Get-WmiObject Win32_DiskPartition -ErrorAction Stop | Where-Object { $_.BootPartition -eq $true } | Select-Object -First 1 if ($bootDisk -and $bootDisk.Name -match 'Disk #(\d+)') { $osDiskNum = [int]$Matches[1] $_pd = Get-WmiObject -Namespace root\Microsoft\Windows\Storage ` -Class MSFT_PhysicalDisk -ErrorAction Stop | Where-Object { $_.DeviceId -eq [string]$osDiskNum } | Select-Object -First 1 if ($_pd) { $osDriveSSD = ($_pd.MediaType -eq 4) -or ($_pd.BusType -eq 17) } } } catch { $osDriveSSD = $false } } # Aktif fiziksel NIC $nicName = "Bulunamadi"; $nicGuid = $null; $activeNic = $null try { $activeNic = Get-NetAdapter -Physical -ErrorAction Stop | Where-Object { $_.Status -eq "Up" } | Select-Object -First 1 if ($activeNic) { $nicName = $activeNic.Name; $nicGuid = $activeNic.InterfaceGuid } } catch {} # GPU PnP InstanceId (MSI mode icin) $gpuInstanceId = $null try { $gpuInstanceId = (Get-PnpDevice -Class Display -ErrorAction SilentlyContinue | Where-Object { $_.Status -eq "OK" } | Select-Object -First 1).InstanceId } catch {} # SvcHostSplitThresholdInKB: RAM bazli (ramGB * 1024 * 1024 KB) $svcHostThresholdKB = $ramGB * 1024 * 1024 # ============================================================== # BOLUM 4 — TESPİT TABLOSU # ============================================================== function Show-DetectionTable { $lw = 22 function KT-Row { param([string]$Label, [string]$Value, [string]$Color = "White") Write-Host " $($Label.PadRight($lw)): " -NoNewline -ForegroundColor DarkGray Write-Host $Value -ForegroundColor $Color } KT-Row "Cihaz Tipi" $(if ($isLaptop) { "Dizustu (Laptop)" } else { "Masaustu (Desktop)" }) ` $(if ($isLaptop) { "Yellow" } else { "Green" }) KT-Row "Islemci" $cpuName KT-Row "CPU Ureticisi" $cpuVendor ` $(if ($cpuVendor -eq "AMD") { "Cyan" } else { "Blue" }) KT-Row "GPU" $gpuName KT-Row "GPU Turu" $(if ($hasNVIDIA) { "NVIDIA" } elseif ($hasAMD_GPU) { "AMD" } else { "Diger" }) ` $(if ($hasNVIDIA) { "Green" } elseif ($hasAMD_GPU) { "Red" } else { "Gray" }) KT-Row "RAM" "${ramGB} GB" KT-Row "Isletim Sistemi" ($winEdition -replace "Microsoft Windows ", "") KT-Row "Windows Build" "Build $winBuild $(if ($isWin11) { '(Win11)' } else { '(Win10)' })" ` $(if ($isWin11) { "Green" } else { "Yellow" }) KT-Row "OS Diski" $(if ($osDriveSSD) { "SSD" } else { "HDD - bazi tweakler atlanacak" }) ` $(if ($osDriveSSD) { "Green" } else { "Yellow" }) KT-Row "Ag Adaptoru" $nicName Write-Host "" Write-Host " Sisteminizle uyumlu iyilestirmeler yapilacak." -ForegroundColor Cyan Write-Host "" } Show-DetectionTable # Tespit sonuclari loga yaz Write-KT-Log -Level "SYS " -Message "Laptop=$isLaptop | CPU=$cpuVendor | NVIDIA=$hasNVIDIA | AMD_GPU=$hasAMD_GPU | SSD=$osDriveSSD | Win11=$isWin11 | RAM=${ramGB}GB | Build=$winBuild" # ============================================================== # BOLUM 5 — RESTORE MODU # ============================================================== if ($Mode -eq "restore") { Write-KT-Header "KelTweak Geri Alma (Restore) Modu" $backupFiles = Get-ChildItem -Path $script:KT_Dir -Filter "KelTweak_Backup_*.reg" -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending $newKeyFiles = Get-ChildItem -Path $script:KT_Dir -Filter "KelTweak_NewKeys_*.txt" -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending if (-not $backupFiles) { Write-Host " [!!] Hic yedek dosyasi bulunamadi!" -ForegroundColor Red Write-Host " Aranan dizin: $($script:KT_Dir)" -ForegroundColor DarkGray Write-Host "" Read-Host " Cikis icin Enter'a basin" exit 1 } Write-Host " Mevcut yedekler:" -ForegroundColor Gray $i = 1 foreach ($f in $backupFiles | Select-Object -First 5) { Write-Host " [$i] $($f.Name) ($($f.LastWriteTime.ToString('dd.MM.yyyy HH:mm')))" -ForegroundColor DarkCyan $i++ } Write-Host "" $sel = Read-Host " Geri yuklenecek yedek numarasi (Enter = en son [1])" if ($sel -eq "" -or $sel -eq "1") { $sel = 1 } $selIdx = [int]$sel - 1 if ($selIdx -lt 0 -or $selIdx -ge $backupFiles.Count) { $selIdx = 0 } $chosenBackup = $backupFiles[$selIdx] Write-Host "" Write-Host " Secilen yedek: $($chosenBackup.Name)" -ForegroundColor Yellow $confirm = Read-Host " Bu yedegi geri yuklemek istiyor musunuz? [E/H]" if ($confirm -notmatch "^[Ee]") { Write-Host " Iptal edildi." -ForegroundColor Gray exit 0 } Write-Host "" Write-Host " Registry geri yukleniyor..." -ForegroundColor Yellow $regOut = & reg.exe import "$($chosenBackup.FullName)" 2>&1 if ($LASTEXITCODE -eq 0) { Write-Host " [OK] Registry geri yuklendi." -ForegroundColor Green } else { Write-Host " [!!] Registry geri yukleme hatasi: $regOut" -ForegroundColor Red } # Yeni eklenen key'leri sil (eslesik new_keys dosyasini bul) $matchedNewKeys = $newKeyFiles | Where-Object { $_.Name -replace "KelTweak_NewKeys_", "" -replace ".txt", "" -eq $chosenBackup.Name -replace "KelTweak_Backup_", "" -replace ".reg", "" } | Select-Object -First 1 if ($matchedNewKeys) { $keysToDelete = Get-Content $matchedNewKeys.FullName -ErrorAction SilentlyContinue | Where-Object { $_.Trim() } if ($keysToDelete) { Write-Host "" Write-Host " Script tarafindan eklenen kayit yollari siliniyor..." -ForegroundColor Yellow foreach ($key in $keysToDelete) { & reg.exe delete "$key" /f 2>&1 | Out-Null Write-Host " [--] Silindi: $key" -ForegroundColor DarkGray } } } Write-Host "" Write-Host " Geri alma tamamlandi." -ForegroundColor Green Write-Host " Tam etkili olmasi icin sistemi yeniden baslatmaniz onerilir." -ForegroundColor Yellow Write-Host "" $rb = Read-Host " Simdi yeniden baslatilsin mi? [E/H]" if ($rb -match "^[Ee]") { Restart-Computer -Force } exit 0 } # ============================================================== # BOLUM 6 — PROFİL SECİM MENUSU # ============================================================== function Show-ProfileMenu { Write-KT-Header "Adim 1/4 Profil Secimi" Write-Host " Hangi profili uygulamak istiyorsunuz?" -ForegroundColor White Write-Host "" Write-Host " [1] Temel " -NoNewline -ForegroundColor White Write-Host " Guvenli tweakler: Telemetri, Gizlilik, Boot, Yardimci servisler" -ForegroundColor Cyan Write-Host " Tum kullanicilara uygundur. Geri donus en kolay." -ForegroundColor DarkGray Write-Host "" Write-Host " [2] Oyun " -NoNewline -ForegroundColor White Write-Host " Temel + CPU/GPU/Ag/Girdi optimizasyonu. Anti-cheat uyumlu." -ForegroundColor Green Write-Host " ONERILEN PROFIL. 82 tweakin cogunlugu dahil." -ForegroundColor DarkGray Write-Host "" Write-Host " [3] Tam " -NoNewline -ForegroundColor White Write-Host " Oyun + Tum servisler, zamanli gorevler, debloat uygulamalari." -ForegroundColor Yellow Write-Host " En kapsamli. Daha fazla degisiklik. Dikkatli kullan." -ForegroundColor DarkGray Write-Host "" $sel = "" do { $sel = Read-Host " Seciminiz [1/2/3] (Enter = 2 Oyun)" if ($sel -eq "") { $sel = "2" } } while ($sel -notmatch "^[123]$") $profile = @{ "1" = "basic"; "2" = "gaming"; "3" = "full" }[$sel] $pname = switch ($profile) { "basic" { "Temel" }; "gaming" { "Oyun" }; "full" { "Tam" } } Write-Host "" Write-Host " Secilen: " -NoNewline -ForegroundColor DarkGray Write-Host $pname -ForegroundColor Cyan Write-Host "" return $profile } # ============================================================== # BOLUM 7 — OPSİYONEL TWEAKLER (WPF GUI) # ============================================================== function Show-ToggleMenu { # WPF gerekliliklerini yukle Add-Type -AssemblyName PresentationFramework Add-Type -AssemblyName PresentationCore Add-Type -AssemblyName WindowsBase # Tweak tanimlari — Cat, Id, L (etiket), K (opts anahtari), # G (guard scriptblock), W (uyari), Desc (aciklama) $defs = @( # ---- Arayuz (Win11) ---- @{ Cat="Arayuz (Win11)"; Id="QOL22a"; L="Gorev Cubugu sol hizala"; K="TaskbarLeft"; G={ $isWin11 }; W=""; Desc="Win11 varsayilani ortali. Klasik sol hizaya doner." } @{ Cat="Arayuz (Win11)"; Id="QOL22b"; L="Arama kutusunu kaldir"; K="SearchBoxOff"; G={ $isWin11 }; W=""; Desc="Gorev cubugundaki arama kutusunu tamamen kaldirir." } @{ Cat="Arayuz (Win11)"; Id="QOL22c"; L="Task View butonunu kaldir"; K="TaskViewOff"; G={ $isWin11 }; W=""; Desc="Coklu masaustu (Task View) butonunu gorev cubugundan kaldirir." } @{ Cat="Arayuz (Win11)"; Id="QOL13"; L="Aero Snap kapat"; K="AeroSnapOff"; G={ $true }; W=""; Desc="Pencereleri ekran kenarina sururken otomatik yari ekrana yapismasi engellenir." } @{ Cat="Arayuz (Win11)"; Id="QOL32"; L="Koyu tema uygula"; K="DarkTheme"; G={ $true }; W=""; Desc="Sistem ve uygulama temasini karanlik (Dark) moda alir." } # ---- Ekran / GPU ---- @{ Cat="Ekran / GPU"; Id="DSP02"; L="Adaptive Sync / FreeSync"; K="AdaptiveSync"; G={ $true }; W="VRR destekli monitoru olmayanlarda etkisizdir"; Desc="G-Sync/FreeSync destekli monitorlerde sunum zamanlamasini optimize eden registry tweaki uygulanir." } @{ Cat="Ekran / GPU"; Id="GPU10"; L="Auto HDR etkinlestir"; K="AutoHDR"; G={ $isWin11 }; W="Aktif HDR modu ve HDR destekli monitoru olmali"; Desc="SDR oyunlarini HDR monitorde otomatik HDR'a donusturur. Win11 + aktif HDR modu gereklidir." } @{ Cat="Ekran / GPU"; Id="GPU07"; L="HDCP kapat (NVIDIA)"; K="HdcpOff"; G={ $hasNVIDIA }; W="Netflix/Disney+ gibi DRM akis hizmetleri bozulabilir"; Desc="NVIDIA HDCP icerik koruma protokolu devre disi birakilir. Reboot sonrasi etkin olur." } # ---- Gizlilik ---- @{ Cat="Gizlilik"; Id="PRV09"; L="DRM online dogrulama kapat"; K="WinDrmOff"; G={ $true }; W="Cevrimdisi DRM icerik oynatimi etkilenebilir"; Desc="Windows DRM lisanslarinin internet uzerinden dogrulanmasi engellenir." } # ---- Islemci ---- @{ Cat="Islemci"; Id="CPU11"; L="CPU Idle kapat (Intel desktop)"; K="CpuIdle"; G={ -not $isLaptop -and $cpuVendor -eq "Intel" }; W="ISI BELIRGIN ARTAR - iyi sogutma zorunlu"; Desc="Intel CPU C-state uyku moduna girmez. Dusuk input latency saglar, ancak isi belirgin arttirir." } # ---- Debloat - Kapat ---- @{ Cat="Debloat"; Id="WinAI"; L="Windows AI ve Copilot kaldir"; K="WinAI"; G={ $isWin11 }; W="Feature update sonrasi geri gelebilir, tekrar calistir"; Desc="Copilot sidebar, AppX ve Copilot+ PC Recall ozelligi (DISM) kaldirilir." } @{ Cat="Debloat"; Id="DBL05"; L="Windows Ink Workspace kapat"; K="WinInk"; G={ $true }; W=""; Desc="Gorev cubugundaki kalem/stylus calisma alani butonu gizlenir (registry)." } # ---- Debloat - Kaldir ---- @{ Cat="Debloat"; Id="DBL11"; L="Xbox uygulamalari kaldir"; K="Xbox"; G={ $true }; W="Xbox Game Pass kullananlar secmesin"; Desc="Xbox oyun servisleri AppX paketleri kaldirilir. Game Bar registry ile zaten kapalidir." } @{ Cat="Debloat"; Id="DBL16"; L="OneDrive kaldir"; K="OneDrive"; G={ $true }; W="Aktif senkronizasyon kullananlar secmesin"; Desc="OneDrive /uninstall calistirilir. Dosyalara dokunulmaz." } @{ Cat="Debloat"; Id="DBL12"; L="Cortana kaldir"; K="Cortana"; G={ $true }; W=""; Desc="Cortana AppX paketi kaldirilir. Win11'de Copilot ile birlestirildi." } @{ Cat="Debloat"; Id="DBL13"; L="Clipchamp kaldir"; K="Clipchamp"; G={ $true }; W=""; Desc="Microsoft Clipchamp video duzenleyici AppX kaldirilir." } @{ Cat="Debloat"; Id="DBL14"; L="Mail ve Calendar kaldir"; K="MailCal"; G={ $true }; W=""; Desc="Dahili Posta ve Takvim uygulamasi kaldirilir." } @{ Cat="Debloat"; Id="DBL15"; L="Skype kaldir"; K="Skype"; G={ $true }; W=""; Desc="Skype AppX kaldirilir. Masaustu Skype etkilenmez." } @{ Cat="Debloat"; Id="DBL18"; L="Feedback Hub kaldir"; K="FeedbackHub"; G={ $true }; W=""; Desc="Windows Geribildirim Merkezi AppX kaldirilir." } @{ Cat="Debloat"; Id="DBL19"; L="Phone Link kaldir"; K="PhoneLink"; G={ $true }; W=""; Desc="Android-PC baglantisi (Phone Link) AppX kaldirilir." } @{ Cat="Debloat"; Id="DBL20"; L="Windows Maps kaldir"; K="WinMaps"; G={ $true }; W=""; Desc="Windows Haritalar AppX kaldirilir." } @{ Cat="Debloat"; Id="DBL21"; L="Mixed Reality Portal kaldir"; K="MixedReality"; G={ $true }; W=""; Desc="VR/MR portal AppX kaldirilir. SVC16 ile servisi zaten kapalidir." } @{ Cat="Debloat"; Id="DBL22"; L="Dev Home kaldir"; K="DevHome"; G={ $true }; W=""; Desc="Windows Dev Home gelistirici merkezi AppX kaldirilir." } @{ Cat="Debloat"; Id="DBL23"; L="Bing uygulamalari kaldir"; K="BingApps"; G={ $true }; W=""; Desc="Bing Hava Durumu, Haber, Arama AppX paketleri kaldirilir." } @{ Cat="Debloat"; Id="DBL24"; L="Outlook for Windows kaldir"; K="OutlookNew"; G={ $true }; W="Klasik Office/Outlook etkilenmez"; Desc="Web tabanli yeni Outlook uygulamasi kaldirilir. Klasik Office paketi etkilenmez." } @{ Cat="Debloat"; Id="DBL25"; L="Solitaire Collection kaldir"; K="Solitaire"; G={ $true }; W=""; Desc="Microsoft Solitaire Collection AppX kaldirilir." } @{ Cat="Debloat"; Id="DBL26"; L="Sticky Notes kaldir"; K="StickyNotes"; G={ $true }; W=""; Desc="Microsoft Sticky Notes AppX kaldirilir." } @{ Cat="Debloat"; Id="DBL27"; L="Power Automate Desktop kaldir"; K="PowerAutomate"; G={ $true }; W=""; Desc="Power Automate Desktop AppX kaldirilir." } @{ Cat="Debloat"; Id="DBL28"; L="Sound Recorder kaldir"; K="SoundRecorder"; G={ $true }; W=""; Desc="Windows Ses Kaydedici AppX kaldirilir." } @{ Cat="Debloat"; Id="DBL29"; L="3D Viewer kaldir"; K="ThreeDViewer"; G={ $true }; W=""; Desc="Microsoft 3D Viewer AppX kaldirilir." } @{ Cat="Debloat"; Id="DBL30"; L="Office Hub kaldir"; K="OfficeHub"; G={ $true }; W=""; Desc="Microsoft Office Hub AppX kaldirilir. Klasik Office etkilenmez." } @{ Cat="Debloat"; Id="DBL31"; L="Teams Chat kaldir"; K="TeamsChat"; G={ $true }; W=""; Desc="Win11 dahili Teams Chat AppX kaldirilir. Kurumsal Teams etkilenmez." } ) # Guard'i gecen item'lari filtrele $items = [System.Collections.Generic.List[hashtable]]::new() foreach ($d in $defs) { if (& $d.G) { $items.Add($d) } } # Renk yardimcilari function HexColor($hex) { $hex = $hex.TrimStart('#') $r = [Convert]::ToByte($hex.Substring(0,2),16) $g = [Convert]::ToByte($hex.Substring(2,2),16) $b = [Convert]::ToByte($hex.Substring(4,2),16) [System.Windows.Media.SolidColorBrush][System.Windows.Media.Color]::FromRgb($r,$g,$b) } # Temel pencere XAML [xml]$xaml = @"