private async void BtnCheckDrivers_Click(object sender, EventArgs e) await CheckDriverIntegrity();
$results = @ Timestamp = Get-Date CorruptedFiles = @() RepairsAttempted = $false RepairsSuccessful = $false check for corrupted files windows 11
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"; )); ); private async void BtnCheckDrivers_Click(object sender
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"); EventArgs e) await CheckDriverIntegrity()