public FileCorruptionChecker() InitializeComponent(); this.Text = "Windows 11 File Corruption Checker"; this.Size = new System.Drawing.Size(900, 600);
private async void BtnFullScan_Click(object sender, EventArgs e) await RunSystemCommand("dism /online /cleanup-image /scanhealth", "DISM Health Scan"); check for corrupted files windows 11
switch ($choice) "1" $result = Test-FileIntegrity "2" $result = Test-FileIntegrity "3" $result = Test-FileIntegrity -Repair "4" $result = Test-FileIntegrity -GenerateReport default Write-ColorOutput "Invalid choice" "Red" public FileCorruptionChecker() InitializeComponent(); this
private async void BtnRepairFiles_Click(object sender, EventArgs e) DialogResult result = MessageBox.Show("This will attempt to repair all corrupted system files. Continue?", "Repair Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (result == DialogResult.Yes) await RunSystemCommand("dism /online /cleanup-image /restorehealth", "DISM Restore Health"); await RunSystemCommand("sfc /scannow", "Final SFC Verification"); public FileCorruptionChecker() InitializeComponent()
$choice = Read-Host "`nEnter choice (1-4)"
function Write-ColorOutput param([string]$Message, [string]$Color = "White") Write-Host $Message -ForegroundColor $Color