mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-12-29 16:14:55 +00:00
Files
30 lines
939 B
PowerShell
30 lines
939 B
PowerShell
function Invoke-WPFFeatureInstall {
|
|||
<#
|
|||
|
|||
.SYNOPSIS
|
|||
Installs selected Windows Features
|
|||
|
|||
#>
|
|||
|
|||
if($sync.ProcessRunning){
|
|||
$msg = "[Invoke-WPFFeatureInstall] Install process is currently running."
|
|||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
|||
return
|
|||
}
|
|||
|
|||
|
Fix typo in features variable
This fucker caused every. single. feature in config tab to not install
|
$Features = (Get-WinUtilCheckBoxes)["WPFFeature"]
|
||
|
|||
Invoke-WPFRunspace -ArgumentList $Features -DebugPreference $DebugPreference -ScriptBlock {
|
|||
param($Features, $DebugPreference)
|
|||
|
|||
$sync.ProcessRunning = $true
|
|||
|
|||
Invoke-WinUtilFeatureInstall $Features
|
|||
|
|||
$sync.ProcessRunning = $false
|
|||
Write-Host "==================================="
|
|||
Write-Host "--- Features are Installed ---"
|
|||
Write-Host "--- A Reboot may be required ---"
|
|||
Write-Host "==================================="
|
|||
}
|
|||
}
|