WizardKit/.bin/Scripts/check_disk_fix.ps1
Alan Mason a4c0c487ff 2016-08: Retroactive Updates
* Added OutlookAttachView

* Added PerfMonitor2

* CHKDSK
  * Will use the newer repair features on Windows 8 or newer

* MailPassView & ProduKey
  * Now saved in a 7-Zip encrypted archive to avoid deletion by AV

* SW Checklist / Diagnostics
  * Windows 10 Blocked automatically
    * (Too late but whatevs it was in testing before the cutoff)

* Bugfixes
  * Activate Windows (with BIOS key)
    * Wasn't extracting ProduKey before trying to run it
  * SW Diagnostics
    * Should now report the preview size from BleachBit correctly
2017-11-17 00:51:23 -07:00

28 lines
745 B
PowerShell

# WK-Check Disk
## Init ##
$wd = $(Split-Path $MyInvocation.MyCommand.Path)
pushd "$wd"
. .\init.ps1
clear
$host.UI.RawUI.WindowTitle = "WK Check Disk Tool"
# OS Check
. .\os_check.ps1
## Run Scan (fix) ##
write-host "$systemdrive (System Drive)"
if ($win_version -match '^(8|10)$') {
if (ask("Run Spot-fix and security cleanup?")) {
start -wait "chkdsk" -argumentlist @("$systemdrive", "/sdcleanup", "/spotfix") -nonewwindow
} else if (ask("Run full offline scan?")) {
start -wait "chkdsk" -argumentlist @("$systemdrive", "/offlinescanandfix") -nonewwindow
}
} else {
start -wait "chkdsk" -argumentlist @("$systemdrive", "/F") -nonewwindow
}
## Done ##
popd
pause "Press Enter to reboot..."
restart-computer