Skip to content

Commit 81f89c9

Browse files
author
Markus Fleschutz
committed
Updated install-crystal-disk-info.ps1
1 parent 5ad6815 commit 81f89c9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scripts/install-crystal-disk-info.ps1

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@
1212
#>
1313

1414
try {
15-
"Installing CrystalDiskInfo, please wait..."
15+
"⏳ Installing CrystalDiskInfo from Microsoft Store, please wait..."
16+
$stopWatch = [system.diagnostics.stopwatch]::startNew()
1617

1718
& winget install "CrystalDiskInfo" --source msstore --accept-package-agreements --accept-source-agreements
18-
if ($lastExitCode -ne 0) { throw "'winget install' failed" }
19+
if ($lastExitCode -ne 0) { throw "Can't install CrystalDiskInfo, is it already installed?" }
1920

20-
"CrystalDiskInfo installed successfully."
21+
int]$elapsed = $stopWatch.Elapsed.TotalSeconds
22+
"✅ CrystalDiskInfo installed successfully in $($elapsed)s."
2123
exit 0 # success
2224
} catch {
23-
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
25+
"⚠️ Error: $($Error[0])"
2426
exit 1
2527
}

0 commit comments

Comments
 (0)