:FULLREPAIR cls echo Running Complete Scan and Repair... echo Step 1: DISM Restore Health dism /online /cleanup-image /restorehealth echo. echo Step 2: SFC Verification sfc /scannow echo. echo Step 3: Component Store Cleanup dism /online /cleanup-image /startcomponentcleanup echo. echo Repair completed! pause > nul goto MENU
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"
function Test-FileIntegrity Out-String
await Task.Run(() => try Process process = new Process(); process.StartInfo.FileName = "cmd.exe"; process.StartInfo.Arguments = $"/c command"; process.StartInfo.UseShellExecute = false; process.StartInfo.RedirectStandardOutput = true; process.StartInfo.RedirectStandardError = true; process.StartInfo.CreateNoWindow = true;
:CHKDSK cls echo Checking Disk for Errors... echo This may take a while... chkdsk /f /r echo. echo Press any key to return to menu... pause > nul goto MENU check for corrupted files windows 11
private async void BtnCheckDrivers_Click(object sender, EventArgs e) await CheckDriverIntegrity();
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" :FULLREPAIR cls echo Running Complete Scan and Repair
$choice = Read-Host "`nEnter choice (1-4)"