diff --git a/functions/public/Invoke-WPFFeatureInstall.ps1 b/functions/public/Invoke-WPFFeatureInstall.ps1 index 9ccf0ad0..02c37881 100644 --- a/functions/public/Invoke-WPFFeatureInstall.ps1 +++ b/functions/public/Invoke-WPFFeatureInstall.ps1 @@ -18,14 +18,12 @@ function Invoke-WPFFeatureInstall { if ($FeatureConfig) { $Features = $FeatureConfig - $automation = $true } else { $Features = (Get-WinUtilCheckBoxes)["WPFFeature"] - $automation = $false } - Invoke-WPFRunspace -ArgumentList $Features, $automation -DebugPreference $DebugPreference -ScriptBlock { - param($Features, $automation, $DebugPreference) + Invoke-WPFRunspace -ArgumentList $Features -DebugPreference $DebugPreference -ScriptBlock { + param($Features, $DebugPreference) $sync.ProcessRunning = $true if ($Features.count -eq 1) { $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" }) diff --git a/functions/public/Invoke-WPFInstall.ps1 b/functions/public/Invoke-WPFInstall.ps1 index 1867a377..120ab56b 100644 --- a/functions/public/Invoke-WPFInstall.ps1 +++ b/functions/public/Invoke-WPFInstall.ps1 @@ -18,10 +18,8 @@ function Invoke-WPFInstall { if ($InstallConfig) { $PackagesToInstall = $InstallConfig - $automation = $true } else { $PackagesToInstall = (Get-WinUtilCheckBoxes)["Install"] - $automation = $false } if ($PackagesToInstall.Count -eq 0) { @@ -31,8 +29,8 @@ function Invoke-WPFInstall { } - Invoke-WPFRunspace -ArgumentList $PackagesToInstall, $automation -DebugPreference $DebugPreference -ScriptBlock { - param($PackagesToInstall, $automation, $DebugPreference) + Invoke-WPFRunspace -ArgumentList $PackagesToInstall -DebugPreference $DebugPreference -ScriptBlock { + param($PackagesToInstall, $DebugPreference) if ($PackagesToInstall.count -eq 1) { $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" }) } else { diff --git a/functions/public/Invoke-WPFtweaksbutton.ps1 b/functions/public/Invoke-WPFtweaksbutton.ps1 index 5a19c31e..342ec04b 100644 --- a/functions/public/Invoke-WPFtweaksbutton.ps1 +++ b/functions/public/Invoke-WPFtweaksbutton.ps1 @@ -18,10 +18,8 @@ function Invoke-WPFtweaksbutton { if ($TweaksConfig) { $Tweaks = $TweaksConfig - $automation = $true } else { $Tweaks = (Get-WinUtilCheckBoxes)["WPFTweaks"] - $automation = $false } Set-WinUtilDNS -DNSProvider $sync["WPFchangedns"].text @@ -34,8 +32,8 @@ function Invoke-WPFtweaksbutton { Write-Debug "Number of tweaks to process: $($Tweaks.Count)" - Invoke-WPFRunspace -ArgumentList $Tweaks, $automation -DebugPreference $DebugPreference -ScriptBlock { - param($Tweaks, $automation, $DebugPreference) + Invoke-WPFRunspace -ArgumentList $Tweaks -DebugPreference $DebugPreference -ScriptBlock { + param($Tweaks, $DebugPreference) Write-Debug "Inside Number of tweaks to process: $($Tweaks.Count)" $sync.ProcessRunning = $true