Check For Corrupted Files Windows 11 Free [90% DIRECT]

function Write-ColorOutput param([string]$Message, [string]$Color = "White") Write-Host $Message -ForegroundColor $Color

private void ParseResults(string output, string command) if (output.Contains("did not find any integrity violations")) AppendColoredText("✓ No corrupted files found!\n", System.Drawing.Color.Green); else if (output.Contains("found corrupt files") && chkAutoRepair.Checked && command.Contains("sfc")) AppendColoredText("⚠ Corrupted files detected. Auto-repair is enabled.\n", System.Drawing.Color.Orange); else if (output.Contains("corrupt") && !chkAutoRepair.Checked) AppendColoredText("⚠ Corrupted files detected. Click 'Repair Corrupted' to fix.\n", System.Drawing.Color.Red); check for corrupted files windows 11

private void InitializeComponent() btnQuickScan = new Button Text = "Quick Scan (SFC)", Location = new System.Drawing.Point(20, 20), Size = new System.Drawing.Size(150, 40) ; btnFullScan = new Button Text = "Full Scan (DISM)", Location = new System.Drawing.Point(180, 20), Size = new System.Drawing.Size(150, 40) ; btnRepairFiles = new Button Text = "Repair Corrupted", Location = new System.Drawing.Point(340, 20), Size = new System.Drawing.Size(150, 40) ; btnCheckDrivers = new Button Text = "Check Drivers", Location = new System.Drawing.Point(500, 20), Size = new System.Drawing.Size(150, 40) ; chkAutoRepair = new CheckBox Text = "Auto-repair when found", Location = new System.Drawing.Point(660, 30), Size = new System.Drawing.Size(180, 25), Checked = true ; txtOutput = new RichTextBox Location = new System.Drawing.Point(20, 70), Size = new System.Drawing.Size(840, 400), ReadOnly = true, Font = new System.Drawing.Font("Consolas", 10) ; progressBar = new ProgressBar Location = new System.Drawing.Point(20, 480), Size = new System.Drawing.Size(840, 30), Style = ProgressBarStyle.Marquee ; lblStatus = new Label Text = "Ready", Location = new System.Drawing.Point(20, 520), Size = new System.Drawing.Size(840, 25) ; dism /online /cleanup-image /scanhealth echo

if ($dismResult -match "Image Health: Health is acceptable") Write-ColorOutput "✓ DISM: Image health is acceptable" "Green" "DISM Health Scan")

:DISM cls echo Running DISM Health Scan... dism /online /cleanup-image /scanhealth echo. echo Press any key to return to menu... pause > nul goto MENU

private async void BtnFullScan_Click(object sender, EventArgs e) await RunSystemCommand("dism /online /cleanup-image /scanhealth", "DISM Health Scan");