public FileCorruptionChecker() InitializeComponent(); this.Text = "Windows 11 File Corruption Checker"; this.Size = new System.Drawing.Size(900, 600);
private async Task CheckDriverIntegrity() EnableControls(false); txtOutput.Clear(); lblStatus.Text = "Checking driver signatures..."; await Task.Run(() => try Where-Object $_.DriverSignature -eq 'Unsigned'\""; process.StartInfo.UseShellExecute = false; process.StartInfo.RedirectStandardOutput = true; process.StartInfo.CreateNoWindow = true; process.Start(); string output = process.StandardOutput.ReadToEnd(); process.WaitForExit();
Invoke(new Action(() => if (string.IsNullOrWhiteSpace(output)) txtOutput.Text = "✓ All drivers are properly signed."; else txtOutput.Text = "⚠ Unsigned drivers found:\n\n" + output; lblStatus.Text = "Driver check completed"; )); catch (Exception ex) Invoke(new Action(() => txtOutput.Text = $"Error checking drivers: ex.Message")); ); EnableControls(true); check for corrupted files windows 11
if ($componentCheck -match "Component Store is\s+(\w+)") $status = $matches[1] if ($status -eq "Cleanable") Write-ColorOutput "⚠ Component store has redundant files (can be cleaned)" "Yellow" elseif ($status -eq "Corrupt") Write-ColorOutput "✗ Component store is corrupted!" "Red"
# Generate HTML report if ($GenerateReport) Out-File -FilePath $ReportPath -Encoding UTF8 Write-ColorOutput "`n📄 Report generated at: $ReportPath" "Cyan" Start-Process $ReportPath public FileCorruptionChecker() InitializeComponent(); this
private void AppendColoredText(string text, System.Drawing.Color color) txtOutput.SelectionStart = txtOutput.TextLength; txtOutput.SelectionLength = 0; txtOutput.SelectionColor = color; txtOutput.AppendText(text); txtOutput.SelectionColor = txtOutput.ForeColor;
Invoke(new Action(() => txtOutput.Text = output + "\n\n" + error; ParseResults(output, command); lblStatus.Text = $"operationName completed. Exit code: process.ExitCode"; )); catch (Exception ex) Invoke(new Action(() => txtOutput.Text = $"Error: ex.Message"; lblStatus.Text = "Operation failed"; )); ); public FileCorruptionChecker() InitializeComponent()
private async void BtnFullScan_Click(object sender, EventArgs e) await RunSystemCommand("dism /online /cleanup-image /scanhealth", "DISM Health Scan");