MyDrift
2024-07-09 00:52:24 +02:00
parent b47036630c
commit a86b07a826
11 changed files with 37 additions and 0 deletions

View File

@ -10,6 +10,9 @@ function Invoke-WinUtilFeatureInstall {
$CheckBox
)
$sync["Form"].taskbarItemInfo.ProgressState = "Normal"
$sync["Form"].taskbarItemInfo.ProgressValue = 1 # Get amount of affected features & scripts
$CheckBox | ForEach-Object {
if($sync.configs.feature.$psitem.feature){
Foreach( $feature in $sync.configs.feature.$psitem.feature ){
@ -23,6 +26,7 @@ function Invoke-WinUtilFeatureInstall {
}
else{
$sync["Form"].taskbarItemInfo.ProgressState = "Error"
Write-Warning "Unable to Install $feature due to unhandled exception"
Write-Warning $psitem.Exception.StackTrace
}
@ -43,6 +47,7 @@ function Invoke-WinUtilFeatureInstall {
}
else{
$sync["Form"].taskbarItemInfo.ProgressState = "Error"
Write-Warning "Unable to Install $feature due to unhandled exception"
Write-Warning $psitem.Exception.StackTrace
}
@ -50,4 +55,7 @@ function Invoke-WinUtilFeatureInstall {
}
}
}
if ($sync["Form"].taskbarItemInfo.ProgressState -ne "Error"){
$sync["Form"].taskbarItemInfo.ProgressState = "None"
}
}