From 3393fba7d704ab1d00395dee091f70d95e718a98 Mon Sep 17 00:00:00 2001 From: Jards Date: Wed, 18 May 2022 01:43:43 +1000 Subject: [PATCH] Added DISM command and button to tool (#19) * Added DISM command and button to tool * Added additional scans and colours to make it clear when each scan type starts Co-authored-by: Chris Titus --- winutil.ps1 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/winutil.ps1 b/winutil.ps1 index bb73d693..a04006e4 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -1146,8 +1146,16 @@ $WPFFeatureInstall.Add_Click({ [System.Windows.MessageBox]::Show($Messageboxbody,$MessageboxTitle,$ButtonType,$MessageIcon) }) +$WPFPanelDISM.Add_Click({ +Start-Process PowerShell -ArgumentList 'Write-Host "Chkdsk" -ForegroundColor Green; Chkdsk; +Write-Host "SFC - 1st scan" -ForegroundColor Green; sfc /scannow; +Write-Host "DISM" -ForegroundColor Green; DISM /Online /Cleanup-Image /Restorehealth; +Write-Host "SFC - 2nd scan" -ForegroundColor Green; sfc /scannow; +Read-Host "Press Enter"' -verb runas +}) + $WPFPanelcontrol.Add_Click({ - cmd /c control +cmd /c control }) $WPFPanelnetwork.Add_Click({ cmd /c ncpa.cpl @@ -1271,6 +1279,8 @@ foreach ($service in $services) { Stop-Service -Name wuauserv Stop-Service -Name appidsvc Stop-Service -Name cryptsvc + + Write-Host "2. Remove QMGR Data file..." Remove-Item "$env:allusersprofile\Application Data\Microsoft\Network\Downloader\qmgr*.dat" -ErrorAction SilentlyContinue