🎨 LDUninstaller-v2.5.0 — Yeni Logo ve Baslangic Yoneticisi Guncellemesi

This commit is contained in:
LilDosto 2026-10-28 06:46:33 +03:00
parent 9b3061444f
commit f062d00475
16 changed files with 294 additions and 116 deletions

View file

@ -1,8 +1,8 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Version>2.4.0</Version> <Version>2.5.0</Version>
<AssemblyVersion>2.4.0.0</AssemblyVersion> <AssemblyVersion>2.5.0.0</AssemblyVersion>
<FileVersion>2.4.0.0</FileVersion> <FileVersion>2.5.0.0</FileVersion>
<Product>LD Uninstaller</Product> <Product>LD Uninstaller</Product>
<Company>LD Software</Company> <Company>LD Software</Company>
<Authors>LD Software</Authors> <Authors>LD Software</Authors>

BIN
app.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

BIN
logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View file

@ -34,7 +34,7 @@ switch ($Type.ToLowerInvariant()) {
$patch += 1 $patch += 1
} }
"current" { "current" {
# Keep existing version for initial packaging # Keep existing version
} }
} }
@ -62,13 +62,13 @@ $propsContent = @"
Set-Content -Path $propsFile -Value $propsContent -Encoding UTF8 Set-Content -Path $propsFile -Value $propsContent -Encoding UTF8
Write-Host "==========================================" -ForegroundColor Cyan Write-Host "==========================================" -ForegroundColor Cyan
Write-Host " LD UNINSTALLER SÜRÜM YAYINLAMA: v$newVersion" -ForegroundColor Yellow Write-Host " LD UNINSTALLER SURUM YAYINLAMA: v$newVersion" -ForegroundColor Yellow
Write-Host "==========================================" -ForegroundColor Cyan Write-Host "==========================================" -ForegroundColor Cyan
# 1. Ana klasörde eski sürümleri temizle (Sadece tek ve son sürüm kalacak şekilde) # 1. Ana klasorde eski surumleri temizle
$oldFolders = Get-ChildItem -Path $root -Directory -Filter "LD Uninstaller v*" $oldFolders = Get-ChildItem -Path $root -Directory -Filter "LD Uninstaller v*"
foreach ($old in $oldFolders) { foreach ($old in $oldFolders) {
Write-Host "Eski sürüm klasörü temizleniyor: $($old.Name)..." -ForegroundColor Gray Write-Host "Eski surum klasoru temizleniyor: $($old.Name)..." -ForegroundColor Gray
try { try {
Remove-Item -Path $old.FullName -Recurse -Force -ErrorAction SilentlyContinue Remove-Item -Path $old.FullName -Recurse -Force -ErrorAction SilentlyContinue
} catch { } } catch { }
@ -77,11 +77,11 @@ foreach ($old in $oldFolders) {
$targetFolderName = "LD Uninstaller v$newVersion" $targetFolderName = "LD Uninstaller v$newVersion"
$targetDir = Join-Path $root $targetFolderName $targetDir = Join-Path $root $targetFolderName
Write-Host "Yeni sürüm klasörü oluşturuluyor: $targetFolderName..." -ForegroundColor Green Write-Host "Yeni surum klasoru olusturuluyor: $targetFolderName..." -ForegroundColor Green
New-Item -ItemType Directory -Path $targetDir -Force | Out-Null New-Item -ItemType Directory -Path $targetDir -Force | Out-Null
# 2. Projeleri Release modunda derle ve tek klasöre aktar # 2. Projeleri Release modunda derle ve yayinla
Write-Host "Projeler derleniyor ve yayınlanıyor..." -ForegroundColor Cyan Write-Host "Projeler derleniyor ve yayinlaniyor..." -ForegroundColor Cyan
$projects = @( $projects = @(
"src/LDUninstaller.UI/LDUninstaller.UI.csproj", "src/LDUninstaller.UI/LDUninstaller.UI.csproj",
@ -92,18 +92,18 @@ $projects = @(
foreach ($proj in $projects) { foreach ($proj in $projects) {
$projPath = Join-Path $root $proj $projPath = Join-Path $root $proj
Write-Host " -> Yayınlanıyor: $proj" -ForegroundColor Gray Write-Host " -> Yayinlaniyor: $proj" -ForegroundColor Gray
dotnet publish $projPath -c Release -o $targetDir --nologo -v q dotnet publish $projPath -c Release -o $targetDir --nologo -v q
} }
# 3. Gereksiz pdb ve log dosyalarını temizle # 3. Gereksiz pdb ve log dosyalarini temizle
Get-ChildItem -Path $targetDir -Filter "*.pdb" | Remove-Item -Force -ErrorAction SilentlyContinue Get-ChildItem -Path $targetDir -Filter "*.pdb" | Remove-Item -Force -ErrorAction SilentlyContinue
# 4. Eski publish ve dist klasörlerini de temizle # 4. Eski publish ve dist klasorlerini de temizle
try { Remove-Item -Path (Join-Path $root "publish") -Recurse -Force -ErrorAction SilentlyContinue } catch { } try { Remove-Item -Path (Join-Path $root "publish") -Recurse -Force -ErrorAction SilentlyContinue } catch { }
try { Remove-Item -Path (Join-Path $root "dist") -Recurse -Force -ErrorAction SilentlyContinue } catch { } try { Remove-Item -Path (Join-Path $root "dist") -Recurse -Force -ErrorAction SilentlyContinue } catch { }
# 5. Sürüm ZIP Arşivini Oluştur (GitHub Releases için) # 5. Surum ZIP Arsivini Olustur
$oldZips = Get-ChildItem -Path $root -File -Filter "LD-Uninstaller-v*.zip" $oldZips = Get-ChildItem -Path $root -File -Filter "LD-Uninstaller-v*.zip"
foreach ($oz in $oldZips) { foreach ($oz in $oldZips) {
try { Remove-Item -Path $oz.FullName -Force -ErrorAction SilentlyContinue } catch { } try { Remove-Item -Path $oz.FullName -Force -ErrorAction SilentlyContinue } catch { }
@ -111,15 +111,15 @@ foreach ($oz in $oldZips) {
$zipName = "LD-Uninstaller-v$newVersion.zip" $zipName = "LD-Uninstaller-v$newVersion.zip"
$zipPath = Join-Path $root $zipName $zipPath = Join-Path $root $zipName
Write-Host "Sürüm arşivi oluşturuluyor: $zipName..." -ForegroundColor Cyan Write-Host "Surum arsivi olusturuluyor: $zipName..." -ForegroundColor Cyan
Compress-Archive -Path "$targetDir\*" -DestinationPath $zipPath -Force Compress-Archive -Path "$targetDir\*" -DestinationPath $zipPath -Force
# 6. Git DeÄŸiÅŸiklikleri, Etiket (Tag) ve GitHub Senkronizasyonu # 6. Git Islemleri ve GitHub Push
if (Test-Path (Join-Path $root ".git")) { if (Test-Path (Join-Path $root ".git")) {
Write-Host "`nGit değişiklikleri işleniyor ve GitHub'a aktarılıyor..." -ForegroundColor Cyan Write-Host "`nGit degisiklikleri isleniyor ve GitHub'a aktariliyor..." -ForegroundColor Cyan
try { try {
if ([string]::IsNullOrWhiteSpace($Message)) { if ([string]::IsNullOrWhiteSpace($Message)) {
$Message = "Release v${newVersion}: 20 Katmanli Derin Kalinti Temizleme Motoru ve Arayuz SadeleÅŸtirmesi" $Message = "Release v${newVersion}: Yeni Logo ve Baslangic Yoneticisi Guncellemesi"
} }
git add . git add .
git commit -m $Message git commit -m $Message
@ -127,24 +127,24 @@ if (Test-Path (Join-Path $root ".git")) {
$remote = git remote get-url origin 2>$null $remote = git remote get-url origin 2>$null
if ($remote) { if ($remote) {
Write-Host "GitHub'a gönderiliyor (origin master --tags)..." -ForegroundColor Yellow Write-Host "GitHub'a gonderiliyor (origin master --tags)..." -ForegroundColor Yellow
git push origin master --tags -u -f git push origin master --tags -u -f
} }
} catch { } catch {
Write-Host "Git işlemi uyarısı: $_" -ForegroundColor Yellow Write-Host "Git islemi uyarisi: $_" -ForegroundColor Yellow
} }
} }
# 7. GitHub Releases API Üzerinde Sürüm ve Değişiklik Notlarını Yayınla # 7. GitHub Releases API Uzerinde Surum ve Notlari Yayinla
try { try {
Write-Host "`nGitHub Releases API üzerinden sürüm ve notlar yayınlanıyor..." -ForegroundColor Cyan Write-Host "`nGitHub Releases API uzerinden surum ve notlar yayinlaniyor..." -ForegroundColor Cyan
$code = @" $code = @"
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
public class GitCredsPublisher public class GitCredsEngine
{ {
[DllImport("Advapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)] [DllImport("Advapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
public static extern bool CredRead(string target, int type, int reservedFlag, out IntPtr credentialPtr); public static extern bool CredRead(string target, int type, int reservedFlag, out IntPtr credentialPtr);
@ -180,16 +180,16 @@ public class GitCredsPublisher
} }
} }
"@ "@
if (-not ([System.Management.Automation.PSTypeName]'GitCredsPublisher').Type) { if (-not ([System.Management.Automation.PSTypeName]'GitCredsEngine').Type) {
Add-Type -TypeDefinition $code -Language CSharp Add-Type -TypeDefinition $code -Language CSharp
} }
$token = [GitCredsPublisher]::GetToken() $token = [GitCredsEngine]::GetToken()
if ($env:GITHUB_TOKEN) { $token = $env:GITHUB_TOKEN } if ($env:GITHUB_TOKEN) { $token = $env:GITHUB_TOKEN }
if ($env:GH_TOKEN) { $token = $env:GH_TOKEN } if ($env:GH_TOKEN) { $token = $env:GH_TOKEN }
if (-not $token) { if (-not $token) {
Write-Host "Uyarı: GitHub kimlik belirteci (token) bulunamadı. Release API atlanıyor." -ForegroundColor Yellow Write-Host "Uyari: GitHub kimlik belirteci bulunamadi. Release API atlaniyor." -ForegroundColor Yellow
} else { } else {
$apiHeaders = @{ $apiHeaders = @{
"Authorization" = "Bearer $token" "Authorization" = "Bearer $token"
@ -200,17 +200,17 @@ public class GitCredsPublisher
$repoOwner = "LilDosto" $repoOwner = "LilDosto"
$repoName = "LD-Unistaller" $repoName = "LD-Unistaller"
# Changelog / Sürüm Notları (Şablon dosyasından temiz UTF-8 olarak yüklenir) # Changelog / Surum Notlari (Sablon dosyasindan UTF-8 olarak okunur)
$templatePath = Join-Path $root "release_notes_template.md" $templatePath = Join-Path $root "release_notes_template.md"
$releaseNotes = "" $releaseNotes = ""
if (Test-Path $templatePath) { if (Test-Path $templatePath) {
$releaseNotes = [System.IO.File]::ReadAllText($templatePath, [System.Text.Encoding]::UTF8) $releaseNotes = [System.IO.File]::ReadAllText($templatePath, [System.Text.Encoding]::UTF8)
$releaseNotes = $releaseNotes.Replace("{VERSION}", $newVersion) $releaseNotes = $releaseNotes.Replace("{VERSION}", $newVersion)
} else { } else {
$releaseNotes = "LD Uninstaller v$newVersion güncellemesi." $releaseNotes = "LD Uninstaller v$newVersion guncellemesi."
} }
$releaseTitle = "🧹 LDUninstaller-v$newVersion — Derin Kalıntı Temizleme ve Çoklu Disk Güncellemesi" $releaseTitle = if (![string]::IsNullOrWhiteSpace($Message)) { $Message } else { "LDUninstaller-v$newVersion - Guncelleme" }
$releasePayload = @{ $releasePayload = @{
tag_name = "v$newVersion" tag_name = "v$newVersion"
@ -222,7 +222,6 @@ public class GitCredsPublisher
$jsonBytes = [System.Text.Encoding]::UTF8.GetBytes($releasePayload) $jsonBytes = [System.Text.Encoding]::UTF8.GetBytes($releasePayload)
# Release var mı kontrol et
$releaseUrl = "https://api.github.com/repos/$repoOwner/$repoName/releases/tags/v$newVersion" $releaseUrl = "https://api.github.com/repos/$repoOwner/$repoName/releases/tags/v$newVersion"
$ghRelease = $null $ghRelease = $null
try { try {
@ -230,20 +229,19 @@ public class GitCredsPublisher
} catch { } } catch { }
if ($ghRelease) { if ($ghRelease) {
Write-Host "Mevcut release güncelleniyor (ID: $($ghRelease.id))..." -ForegroundColor Yellow Write-Host "Mevcut release guncelleniyor (ID: $($ghRelease.id))..." -ForegroundColor Yellow
$patchUrl = "https://api.github.com/repos/$repoOwner/$repoName/releases/$($ghRelease.id)" $patchUrl = "https://api.github.com/repos/$repoOwner/$repoName/releases/$($ghRelease.id)"
$ghRelease = Invoke-RestMethod -Uri $patchUrl -Headers $apiHeaders -Method Patch -Body $jsonBytes -ContentType "application/json; charset=utf-8" $ghRelease = Invoke-RestMethod -Uri $patchUrl -Headers $apiHeaders -Method Patch -Body $jsonBytes -ContentType "application/json; charset=utf-8"
} else { } else {
Write-Host "Yeni release oluÅŸturuluyor..." -ForegroundColor Green Write-Host "Yeni release olusturuluyor..." -ForegroundColor Green
$postUrl = "https://api.github.com/repos/$repoOwner/$repoName/releases" $postUrl = "https://api.github.com/repos/$repoOwner/$repoName/releases"
$ghRelease = Invoke-RestMethod -Uri $postUrl -Headers $apiHeaders -Method Post -Body $jsonBytes -ContentType "application/json; charset=utf-8" $ghRelease = Invoke-RestMethod -Uri $postUrl -Headers $apiHeaders -Method Post -Body $jsonBytes -ContentType "application/json; charset=utf-8"
} }
# ZIP dosyasını release asset olarak yükle # ZIP dosyasini release asset olarak yukle
if ($ghRelease -and (Test-Path $zipPath)) { if ($ghRelease -and (Test-Path $zipPath)) {
Write-Host "Sürüm paketi ($zipName) release sayfasına yükleniyor..." -ForegroundColor Cyan Write-Host "Surum paketi ($zipName) release sayfasina yukleniyor..." -ForegroundColor Cyan
# Eski asset varsa sil
if ($ghRelease.assets) { if ($ghRelease.assets) {
foreach ($asset in $ghRelease.assets) { foreach ($asset in $ghRelease.assets) {
if ($asset.name -eq $zipName) { if ($asset.name -eq $zipName) {
@ -262,23 +260,23 @@ public class GitCredsPublisher
} }
$zipBytes = [System.IO.File]::ReadAllBytes($zipPath) $zipBytes = [System.IO.File]::ReadAllBytes($zipPath)
$uploadResult = Invoke-RestMethod -Uri $uploadUri -Headers $uploadHeaders -Method Post -Body $zipBytes -ContentType "application/zip" $uploadResult = Invoke-RestMethod -Uri $uploadUri -Headers $uploadHeaders -Method Post -Body $zipBytes -ContentType "application/zip"
Write-Host "Asset başarıyla yüklendi: $($uploadResult.browser_download_url)" -ForegroundColor Green Write-Host "Asset basariyla yuklendi: $($uploadResult.browser_download_url)" -ForegroundColor Green
} }
Write-Host "`nGitHub Release yayında:" -ForegroundColor Yellow Write-Host "`nGitHub Release yayinda:" -ForegroundColor Yellow
Write-Host " -> https://github.com/$repoOwner/$repoName/releases/tag/v$newVersion" -ForegroundColor White Write-Host " -> https://github.com/$repoOwner/$repoName/releases/tag/v$newVersion" -ForegroundColor White
} }
} catch { } catch {
Write-Host "GitHub Releases API işlemi uyarısı: $_" -ForegroundColor Yellow Write-Host "GitHub Releases API islemi uyarisi: $_" -ForegroundColor Yellow
} }
Write-Host "`n✅ Başarıyla Tamamlandı!" -ForegroundColor Green Write-Host "`n[+] Basariyla Tamamlandi!" -ForegroundColor Green
Write-Host "Ana dizinde oluşturulan son güncel sürüm klasörü:" -ForegroundColor Yellow Write-Host "Ana dizinde olusturulan son guncel surum klasoru:" -ForegroundColor Yellow
Write-Host " -> $targetFolderName" -ForegroundColor White Write-Host " -> $targetFolderName" -ForegroundColor White
Write-Host "GitHub Release için hazır paket:" -ForegroundColor White Write-Host "GitHub Release hazir paketi:" -ForegroundColor White
Write-Host " -> $zipName" -ForegroundColor Cyan Write-Host " -> $zipName" -ForegroundColor Cyan
Write-Host "Kullanıma hazır yürütülebilir dosyalar:" -ForegroundColor Gray Write-Host "Kullanima hazir yurutulebilir dosyalar:" -ForegroundColor Gray
Write-Host " - LDUninstaller.Launcher.exe (Yönetici yetkili başlatıcı)" Write-Host " - LDUninstaller.Launcher.exe (Yonetici yetkili baslatici)"
Write-Host " - LDUninstaller.UI.exe (Modern Fluent Arayüz)" Write-Host " - LDUninstaller.UI.exe (Modern Fluent Arayuz)"
Write-Host " - LDUninstaller.CLI.exe (Konsol aracı)" Write-Host " - LDUninstaller.CLI.exe (Konsol araci)"
Write-Host " - LDUninstaller.Automatizer.exe (Otomasyon ajanı)`n" Write-Host " - LDUninstaller.Automatizer.exe (Otomasyon ajani)`n"

View file

@ -1,28 +1,26 @@
Bu sürümde, kaldırılan uygulamaların arkasında bıraktığı tüm dosya, kayıt defteri, servis ve görev kalıntılarını eksiksiz temizleyen 20 katmanlı derin tarama motoru ve çoklu sürücü analiz sistemi arayüze entegre edilmiştir. Bu sürümde, LD Uninstaller için özel tasarlanan modern logo/ikon paketi entegre edilmiş ve Başlangıç Yöneticisi'ndeki yetki ve açılış engelleme sorunları tamamen giderilmiştir.
--- ---
### ✨ Neler Eklendi ve İyileştirildi? ### ✨ Neler Eklendi ve İyileştirildi?
**1. 🧹 20 Katmanlı Derin Kalıntı ve Artık Temizleme Motoru** **1. 🎨 Yepyeni Modern Logo ve Uygulama Simgesi (App Icon)**
- Kaldırma işlemi (tekli veya çoklu) tamamlandığı anda otomatik devreye giren kalıntı temizleme arayüzü eklendi: - Uygulama için modern Windows 11 Fluent tasarımına uyumlu fütüristik 'LD' amblemi ve temizleme girdabı motifli yeni logo tasarlandı.
- **Servis & Görev Temizliği:** Arka planda unutulan Windows Servisleri (`sc delete`) ve Görev Zamanlayıcı (`Tasks`) updater görevleri otomatik taranıp temizlenir. - **Tüm Alanlara Entegre Edildi:**
- **Kayıt Defteri & COM:** Shell sağ tık menüleri (`ContextMenuHandlers`), `App Paths`, `Run/RunOnce` ve yetim `CLSID` nesneleri temizlenir. - Arayüzün sol üst köşesindeki geçici mavi kutu kaldırılarak yüksek çözünürlüklü yeni logo yerleştirildi.
- **Kullanıcı Verileri:** `%AppData%`, `%LocalAppData%`, `%USERPROFILE%` altındaki gizli `.appname` / `.config` klasörleri ve boş kalan yayıncı dizinleri silinir. - Görev Yöneticisi (Task Manager), pencere başlıkları ve Windows Gezgini (klasör) üzerinde görünmesi için çoklu çözünürlüklü (`16x16`'dan `256x256`'ya) `.ico` dosyası yürütülebilir dosyalara gömüldü.
- **Güvenli Yedek:** Silme işleminden önce kayıt defteri anahtarları otomatik olarak `.reg` yedeğine aktarılır.
**2. 💾 Çoklu Disk Analizi ve Üst Sekmeler** **2. ⚡ Başlangıç Yöneticisi ve Yetki Hatası Düzeltmesi**
- Sistemdeki tüm takılı sürücüler (`C:`, `D:`, harici diskler vb.) otomatik analiz edilerek üst kısıma modern sekme butonları olarak eklendi: - Uygulama zaten Yönetici olarak açılmasına rağmen bazı uygulamaları kapatırken ortaya çıkan *"Yönetici yetkisi gerekebilir"* uyarısı ve kapatamama sorunu kökten çözüldü:
- **Dinamik Disk Haritası:** Sürücü sekmeleri arasında geçiş yapıldığında hem uygulama tablosu hem de görsel Treemap haritası anında seçilen diske göre filtrelenir. - **Başlangıç Klasörü Desteği:** `StartupFolder` altındaki kısayollar için hem `StartupApproved` ikili anahtarı hem de dosya devre dışı bırakma desteği eklendi.
- **Oyun ve Kütüphane Tespiti:** İkincil disklerdeki `Games`, `Oyunlar` ve `SteamLibrary` dizinleri eksiksiz taranır. - **HKLM & 32-bit (Run32) Uyumu:** 64-bit Windows sistemlerinde `WOW6432Node` ve `HKLM` anahtarlarına ait programların açılış durumları doğru kayıt defteri dallarına yazılarak sorunsuz hale getirildi.
- **Servis Yönetimi:** Windows Servisleri'nin başlangıç durumları (`Automatic`/`Disabled`) doğrudan `sc.exe config` ve sistem kayıt defteri üzerinden anında değiştirilebilir kılındı.
**3. ⚡ Ultra Akıcı Arayüz ve Sıfır Takılma** **3. 🧹 20 Katmanlı Derin Kalıntı Temizleme Motoru**
- Arama çubuğuna yazarken UI kilitlenmesini önleyen 160ms gecikmeli filtreleme (debounced search) getirildi. - Kaldırma işlemi bittiğinde arkada kalan tüm öksüz servisler, zamanlanmış görevler, kayıt defteri dalları ve gizli kullanıcı yapılandırma dosyaları eksiksiz taranır ve silinir.
- Donanım hızlandırmalı sanallaştırılmış liste kaydırması (`Pixel` scroll unit) ile yüksek kare hızında akıcılık sağlandı.
**4. 🗑️ Sadeleştirilmiş Tek Tuşla Kaldırma** **4. 💾 Çoklu Sürücü Yönetimi ve Disk Haritası**
- Arayüzdeki kafa karıştırıcı çoklu kaldırma butonları kaldırılarak tek ve akıllı bir **`🗑️ Kaldır`** butonu eklendi. - Bilgisayara takılı birden fazla disk (`C:`, `D:` vb.) varsa üst sekme çubuğu üzerinden kolayca geçiş yapılır ve görsel Treemap haritası seçilen diske göre dinamik güncellenir.
- Tek uygulama seçildiğinde doğrudan kaldırma, birden fazla seçildiğinde çakışma önleyici akıllı kuyruk devreye girer.
--- ---

View file

@ -18,6 +18,7 @@ namespace LDUninstaller.Core.Models
public string Publisher { get; set; } = string.Empty; public string Publisher { get; set; } = string.Empty;
public StartupType Type { get; set; } public StartupType Type { get; set; }
public string Location { get; set; } = string.Empty; public string Location { get; set; } = string.Empty;
public string ServiceName { get; set; } = string.Empty;
public bool IsEnabled { get; set; } = true; public bool IsEnabled { get; set; } = true;
public byte[]? StartupApprovedBinary { get; set; } public byte[]? StartupApprovedBinary { get; set; }

View file

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.IO; using System.IO;
using System.ServiceProcess; using System.ServiceProcess;
using LDUninstaller.Core.Models; using LDUninstaller.Core.Models;
@ -14,34 +15,40 @@ namespace LDUninstaller.Core.Startup
var list = new List<StartupEntry>(); var list = new List<StartupEntry>();
// 1. Registry HKCU Run // 1. Registry HKCU Run
ScanRegistryRun(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Run", StartupType.RegistryRun, list); ScanRegistryRun(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Run", StartupType.RegistryRun, list, isHklm: false, isWow64: false);
// 2. Registry HKLM Run // 2. Registry HKLM Run
ScanRegistryRun(Registry.LocalMachine, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", StartupType.RegistryRun, list); ScanRegistryRun(Registry.LocalMachine, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", StartupType.RegistryRun, list, isHklm: true, isWow64: false);
// 3. Registry HKLM 32-bit (Wow6432Node) // 3. Registry HKLM 32-bit (Wow6432Node)
if (Environment.Is64BitOperatingSystem) if (Environment.Is64BitOperatingSystem)
{ {
using var baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32); try
using var key = baseKey.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
if (key != null)
{ {
foreach (var name in key.GetValueNames()) using var baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32);
using var key = baseKey.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
if (key != null)
{ {
var val = key.GetValue(name)?.ToString() ?? string.Empty; foreach (var name in key.GetValueNames())
list.Add(new StartupEntry
{ {
Name = name, var val = key.GetValue(name)?.ToString() ?? string.Empty;
Command = val, list.Add(new StartupEntry
Type = StartupType.RegistryRun, {
Location = @"HKLM\Software\Wow6432Node\...\Run", Name = name,
IsEnabled = CheckStartupApproved(name) Command = val,
}); Type = StartupType.RegistryRun,
Location = @"HKLM\Software\Wow6432Node\...\Run",
IsEnabled = CheckStartupApproved(name, isHklm: true, isWow64: true)
});
}
} }
} }
catch { }
} }
// 4. Startup Folders // 4. Startup Folders
ScanFolder(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "User Startup Folder", list); ScanFolder(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "Kullanıcı Başlangıç Klasörü", list, isCommon: false);
ScanFolder(Environment.GetFolderPath(Environment.SpecialFolder.CommonStartup), "All Users Startup Folder", list); ScanFolder(Environment.GetFolderPath(Environment.SpecialFolder.CommonStartup), "Tüm Kullanıcılar Başlangıç Klasörü", list, isCommon: true);
// 5. Services (3rd party automatic) // 5. Services (3rd party automatic)
ScanServices(list); ScanServices(list);
@ -49,7 +56,7 @@ namespace LDUninstaller.Core.Startup
return list; return list;
} }
private static void ScanRegistryRun(RegistryKey root, string subKey, StartupType type, List<StartupEntry> list) private static void ScanRegistryRun(RegistryKey root, string subKey, StartupType type, List<StartupEntry> list, bool isHklm, bool isWow64)
{ {
try try
{ {
@ -65,28 +72,40 @@ namespace LDUninstaller.Core.Startup
Command = cmd, Command = cmd,
Type = type, Type = type,
Location = $"{root.Name}\\{subKey}", Location = $"{root.Name}\\{subKey}",
IsEnabled = CheckStartupApproved(name) IsEnabled = CheckStartupApproved(name, isHklm, isWow64)
}); });
} }
} }
catch { } catch { }
} }
private static void ScanFolder(string path, string locationDesc, List<StartupEntry> list) private static void ScanFolder(string path, string locationDesc, List<StartupEntry> list, bool isCommon)
{ {
if (string.IsNullOrWhiteSpace(path) || !Directory.Exists(path)) return; if (string.IsNullOrWhiteSpace(path) || !Directory.Exists(path)) return;
try try
{ {
foreach (var file in Directory.GetFiles(path)) foreach (var file in Directory.GetFiles(path))
{ {
string name = Path.GetFileNameWithoutExtension(file); string ext = Path.GetExtension(file).ToLowerInvariant();
if (ext != ".lnk" && ext != ".url" && ext != ".disabled") continue;
string fileName = Path.GetFileName(file);
string displayName = Path.GetFileNameWithoutExtension(file);
bool isEnabled = !ext.Equals(".disabled", StringComparison.OrdinalIgnoreCase);
// Check StartupApproved for startup folder
if (isEnabled)
{
isEnabled = CheckStartupFolderApproved(fileName, isCommon);
}
list.Add(new StartupEntry list.Add(new StartupEntry
{ {
Name = name, Name = displayName,
Command = file, Command = file,
Type = StartupType.StartupFolder, Type = StartupType.StartupFolder,
Location = locationDesc, Location = locationDesc,
IsEnabled = true IsEnabled = isEnabled
}); });
} }
} }
@ -106,19 +125,25 @@ namespace LDUninstaller.Core.Startup
if (key != null) if (key != null)
{ {
int startType = (int)(key.GetValue("Start") ?? 3); int startType = (int)(key.GetValue("Start") ?? 3);
// 2 = Automatic string imgPath = key.GetValue("ImagePath")?.ToString() ?? "";
if (startType == 2) string imgLower = imgPath.ToLowerInvariant();
// 2 = Automatic, 3 = Manual, 4 = Disabled
// Exclude internal OS services
if (!imgLower.Contains(@"\windows\system32\svchost.exe") &&
!imgLower.Contains(@"\windows\system32\services.exe") &&
!imgLower.Contains(@"\windows\system32\lsass.exe"))
{ {
string imgPath = key.GetValue("ImagePath")?.ToString() ?? ""; if (startType == 2 || startType == 4)
if (!imgPath.ToLowerInvariant().Contains(@"windows\system32"))
{ {
list.Add(new StartupEntry list.Add(new StartupEntry
{ {
Name = sc.DisplayName, Name = sc.DisplayName,
ServiceName = sc.ServiceName,
Command = imgPath, Command = imgPath,
Type = StartupType.Service, Type = StartupType.Service,
Location = "Windows Service", Location = "Windows Servisi",
IsEnabled = sc.Status == ServiceControllerStatus.Running IsEnabled = (startType == 2)
}); });
} }
} }
@ -130,15 +155,57 @@ namespace LDUninstaller.Core.Startup
catch { } catch { }
} }
public static bool CheckStartupApproved(string entryName) public static bool CheckStartupApproved(string entryName, bool isHklm = false, bool isWow64 = false)
{ {
try try
{ {
using var key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run"); string approvedSub = isWow64 ? @"Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run32"
if (key?.GetValue(entryName) is byte[] data && data.Length > 0) : @"Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run";
// First check HKCU
using (var key = Registry.CurrentUser.OpenSubKey(approvedSub))
{ {
// 0x02 is enabled, 0x03 or other is disabled if (key?.GetValue(entryName) is byte[] data && data.Length > 0)
return data[0] == 0x02; {
return data[0] == 0x02;
}
}
// If HKLM, also check HKLM StartupApproved
if (isHklm)
{
using var hklmKey = Registry.LocalMachine.OpenSubKey(approvedSub);
if (hklmKey?.GetValue(entryName) is byte[] data && data.Length > 0)
{
return data[0] == 0x02;
}
}
}
catch { }
return true;
}
public static bool CheckStartupFolderApproved(string fileName, bool isCommon)
{
try
{
const string approvedSub = @"Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\StartupFolder";
using (var key = Registry.CurrentUser.OpenSubKey(approvedSub))
{
if (key?.GetValue(fileName) is byte[] data && data.Length > 0)
{
return data[0] == 0x02;
}
}
if (isCommon)
{
using var hklmKey = Registry.LocalMachine.OpenSubKey(approvedSub);
if (hklmKey?.GetValue(fileName) is byte[] data && data.Length > 0)
{
return data[0] == 0x02;
}
} }
} }
catch { } catch { }
@ -149,36 +216,136 @@ namespace LDUninstaller.Core.Startup
{ {
try try
{ {
byte[] binaryData = enable
? new byte[] { 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
: new byte[] { 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
if (entry.Type == StartupType.RegistryRun) if (entry.Type == StartupType.RegistryRun)
{ {
using var key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run"); bool isWow64 = entry.Location.Contains("Wow6432Node", StringComparison.OrdinalIgnoreCase);
if (key != null) bool isHklm = entry.Location.Contains("HKEY_LOCAL_MACHINE", StringComparison.OrdinalIgnoreCase) || entry.Location.Contains("HKLM", StringComparison.OrdinalIgnoreCase);
string approvedSub = isWow64 ? @"Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run32"
: @"Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run";
// Always write to HKCU
using (var key = Registry.CurrentUser.CreateSubKey(approvedSub))
{ {
byte[] data = enable key?.SetValue(entry.Name, binaryData, RegistryValueKind.Binary);
? new byte[] { 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
: new byte[] { 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
key.SetValue(entry.Name, data, RegistryValueKind.Binary);
entry.IsEnabled = enable;
return true;
} }
// If it was in HKLM, also write to HKLM
if (isHklm)
{
try
{
using var key = Registry.LocalMachine.CreateSubKey(approvedSub);
key?.SetValue(entry.Name, binaryData, RegistryValueKind.Binary);
}
catch { }
}
entry.IsEnabled = enable;
return true;
}
else if (entry.Type == StartupType.StartupFolder)
{
string fileName = Path.GetFileName(entry.Command);
bool isCommon = entry.Location.Contains("Tüm Kullanıcılar", StringComparison.OrdinalIgnoreCase) || entry.Location.Contains("All Users", StringComparison.OrdinalIgnoreCase);
const string approvedFolderSub = @"Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\StartupFolder";
// Write to StartupApproved\StartupFolder in HKCU
using (var key = Registry.CurrentUser.CreateSubKey(approvedFolderSub))
{
key?.SetValue(fileName, binaryData, RegistryValueKind.Binary);
}
if (isCommon)
{
try
{
using var key = Registry.LocalMachine.CreateSubKey(approvedFolderSub);
key?.SetValue(fileName, binaryData, RegistryValueKind.Binary);
}
catch { }
}
// Fallback rename if StartupApproved is not respected
try
{
if (!enable && File.Exists(entry.Command) && !entry.Command.EndsWith(".disabled", StringComparison.OrdinalIgnoreCase))
{
string newPath = entry.Command + ".disabled";
File.Move(entry.Command, newPath);
entry.Command = newPath;
}
else if (enable && File.Exists(entry.Command) && entry.Command.EndsWith(".disabled", StringComparison.OrdinalIgnoreCase))
{
string newPath = entry.Command.Substring(0, entry.Command.Length - ".disabled".Length);
File.Move(entry.Command, newPath);
entry.Command = newPath;
}
}
catch { }
entry.IsEnabled = enable;
return true;
} }
else if (entry.Type == StartupType.Service) else if (entry.Type == StartupType.Service)
{ {
using var sc = new ServiceController(entry.Name); string svcName = !string.IsNullOrEmpty(entry.ServiceName) ? entry.ServiceName : entry.Name;
if (enable && sc.Status != ServiceControllerStatus.Running) int targetStartType = enable ? 2 : 4; // 2 = Auto, 4 = Disabled
// 1. Update Registry Start type directly
try
{ {
sc.Start(); using var key = Registry.LocalMachine.OpenSubKey($@"SYSTEM\CurrentControlSet\Services\{svcName}", true);
entry.IsEnabled = true; if (key != null)
{
key.SetValue("Start", targetStartType, RegistryValueKind.DWord);
}
} }
else if (!enable && sc.Status == ServiceControllerStatus.Running) catch { }
// 2. Run sc.exe config start= auto / disabled
try
{ {
sc.Stop(); string mode = enable ? "auto" : "disabled";
entry.IsEnabled = false; var psi = new ProcessStartInfo("sc.exe", $"config \"{svcName}\" start= {mode}")
{
CreateNoWindow = true,
UseShellExecute = false
};
using var p = Process.Start(psi);
p?.WaitForExit(3000);
} }
catch { }
// 3. Stop or Start the service
try
{
using var sc = new ServiceController(svcName);
if (!enable && sc.Status == ServiceControllerStatus.Running)
{
sc.Stop();
sc.WaitForStatus(ServiceControllerStatus.Stopped, TimeSpan.FromSeconds(3));
}
else if (enable && sc.Status == ServiceControllerStatus.Stopped)
{
sc.Start();
}
}
catch { }
entry.IsEnabled = enable;
return true; return true;
} }
} }
catch { } catch (Exception ex)
{
Debug.WriteLine($"ToggleStartupEntry error: {ex.Message}");
}
return false; return false;
} }
} }

View file

@ -8,8 +8,13 @@
<UseWindowsForms>true</UseWindowsForms> <UseWindowsForms>true</UseWindowsForms>
<RootNamespace>LDUninstaller.Launcher</RootNamespace> <RootNamespace>LDUninstaller.Launcher</RootNamespace>
<AssemblyName>LDUninstaller.Launcher</AssemblyName> <AssemblyName>LDUninstaller.Launcher</AssemblyName>
<ApplicationIcon>Resources\app.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Resource Include="Resources\app.ico" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\LDUninstaller.Core\LDUninstaller.Core.csproj" /> <ProjectReference Include="..\LDUninstaller.Core\LDUninstaller.Core.csproj" />
</ItemGroup> </ItemGroup>

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

View file

@ -7,6 +7,7 @@
Background="{StaticResource BrushBgDark}" Background="{StaticResource BrushBgDark}"
Foreground="{StaticResource BrushTextPrimary}" Foreground="{StaticResource BrushTextPrimary}"
FontFamily="Segoe UI" FontFamily="Segoe UI"
Icon="pack://application:,,,/Resources/app.ico"
BorderBrush="{StaticResource BrushBorder}" BorderBrush="{StaticResource BrushBorder}"
BorderThickness="1"> BorderThickness="1">

View file

@ -7,6 +7,7 @@
Background="{StaticResource BrushBgDark}" Background="{StaticResource BrushBgDark}"
Foreground="{StaticResource BrushTextPrimary}" Foreground="{StaticResource BrushTextPrimary}"
FontFamily="Segoe UI" FontFamily="Segoe UI"
Icon="pack://application:,,,/Resources/app.ico"
BorderBrush="{StaticResource BrushBorder}" BorderBrush="{StaticResource BrushBorder}"
BorderThickness="1"> BorderThickness="1">

View file

@ -8,8 +8,14 @@
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>LDUninstaller.UI</RootNamespace> <RootNamespace>LDUninstaller.UI</RootNamespace>
<AssemblyName>LDUninstaller.UI</AssemblyName> <AssemblyName>LDUninstaller.UI</AssemblyName>
<ApplicationIcon>Resources\app.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Resource Include="Resources\app.ico" />
<Resource Include="Resources\logo.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\LDUninstaller.Core\LDUninstaller.Core.csproj" /> <ProjectReference Include="..\LDUninstaller.Core\LDUninstaller.Core.csproj" />
</ItemGroup> </ItemGroup>

View file

@ -9,6 +9,7 @@
Background="{StaticResource BrushBgDark}" Background="{StaticResource BrushBgDark}"
Foreground="{StaticResource BrushTextPrimary}" Foreground="{StaticResource BrushTextPrimary}"
FontFamily="Segoe UI" FontFamily="Segoe UI"
Icon="pack://application:,,,/Resources/app.ico"
BorderBrush="{StaticResource BrushBorder}" BorderBrush="{StaticResource BrushBorder}"
BorderThickness="1"> BorderThickness="1">
@ -33,8 +34,8 @@
<!-- App Brand / Logo --> <!-- App Brand / Logo -->
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="20,0"> <StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="20,0">
<Border Background="#2563EB" CornerRadius="8" Width="36" Height="36" Margin="0,0,12,0"> <Border CornerRadius="8" Width="36" Height="36" Margin="0,0,12,0" ClipToBounds="True">
<TextBlock Text="LD" FontSize="16" FontWeight="Bold" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" /> <Image Source="pack://application:,,,/Resources/logo.png" Width="36" Height="36" RenderOptions.BitmapScalingMode="HighQuality" />
</Border> </Border>
<StackPanel VerticalAlignment="Center"> <StackPanel VerticalAlignment="Center">
<TextBlock Text="LD Uninstaller" FontSize="15" FontWeight="Bold" Foreground="White" /> <TextBlock Text="LD Uninstaller" FontSize="15" FontWeight="Bold" Foreground="White" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View file

@ -1,6 +1,6 @@
{ {
"major": 2, "major": 2,
"minor": 4, "minor": 5,
"patch": 0, "patch": 0,
"version": "2.4.0" "version": "2.5.0"
} }