File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1212#>
1313
1414try {
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}
You can’t perform that action at this time.
0 commit comments