From 4ab2a2790dbbb55bed95eb390da22f666d8bb6d2 Mon Sep 17 00:00:00 2001
From: Carter <60557606+Carterpersall@users.noreply.github.com>
Date: Wed, 29 Jun 2022 21:36:11 -0500
Subject: [PATCH] Fix and Tweak #19 (#43)
* Fix Issue in #19
- Pull Request #19 didn't add an entry for PanelDISM into MainWindow.xaml, causing an error to be thrown when the script if executed and a button to not be created
- Fixed by adding an entry into MainWIndow.xaml that creates the needed button under the FixesUpdate button
- Note: To see the fix, you need to comment line 9 and uncomment line 8 to use the local MainWindow.xaml instead of the one in the Main Branch
* Fix Formatting and Tweak Things
- Fixed the formatting
- Tweaked Write-Host's
- Added newlines (`n) to space out the Statuses
- Added progress indicators
- Required "s and 's to be swapped so x/4 does not perform an operation
* Slight Tweak
---
MainWindow.xaml | 1 +
winutil.ps1 | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/MainWindow.xaml b/MainWindow.xaml
index cc42fe1b..3241e87c 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -197,6 +197,7 @@
+
diff --git a/winutil.ps1 b/winutil.ps1
index 9eebce55..35c224df 100644
--- a/winutil.ps1
+++ b/winutil.ps1
@@ -1196,11 +1196,11 @@ $WPFFeatureInstall.Add_Click({
})
$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
+ Start-Process PowerShell -ArgumentList "Write-Host '(1/4) Chkdsk' -ForegroundColor Green; Chkdsk /scan;
+ Write-Host '`n(2/4) SFC - 1st scan' -ForegroundColor Green; sfc /scannow;
+ Write-Host '`n(3/4) DISM' -ForegroundColor Green; DISM /Online /Cleanup-Image /Restorehealth;
+ Write-Host '`n(4/4) SFC - 2nd scan' -ForegroundColor Green; sfc /scannow;
+ Read-Host '`nPress Enter to Continue'" -verb runas
})
$WPFPanelcontrol.Add_Click({