Last active
June 30, 2017 10:57
-
-
Save aetos382/3dc4070a669e98743dfc5fc72367c862 to your computer and use it in GitHub Desktop.
Write-Progress の使い方の試行
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for ($stage = 0; $stage -lt 10; ++$stage) { | |
for ($step = 0; $step -lt 10; ++$step) { | |
Write-Progress ` | |
-Activity 'インストール中' ` | |
-Status "ステージ $stage" ` | |
-CurrentOperation "ステップ $step" ` | |
-PercentComplete ($stage * 10 + $step) ` | |
-Id 0 | |
Start-Sleep -Milliseconds 50 | |
} | |
} | |
Write-Progress -Activity 'インストール中' -Id 0 -Completed | |
Pause | |
for ($stage = 0; $stage -lt 10; ++$stage) { | |
Write-Progress ` | |
-Activity 'インストール中' ` | |
-PercentComplete ($stage * 10) ` | |
-Id 0 | |
for ($step = 0; $step -lt 10; ++$step) { | |
Write-Progress ` | |
-Activity "ステージ $stage" ` | |
-Status "ステップ $step" ` | |
-PercentComplete ($step * 10) ` | |
-Id 1 ` | |
-ParentId 0 | |
Start-Sleep -Milliseconds 50 | |
} | |
Write-Progress ` | |
-Activity "ステージ $stage" ` | |
-Id 1 ` | |
-ParentId 0 ` | |
-Completed | |
} | |
Write-Progress -Activity 'インストール中' -Id 0 -Completed | |
Pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment