mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-01 10:32:35 -05:00
improve automation
- runs everything at the same time - does not work without displaying ui
This commit is contained in:
@ -6,13 +6,21 @@ function Invoke-WPFFeatureInstall {
|
||||
|
||||
#>
|
||||
|
||||
param (
|
||||
$FeatureConfig
|
||||
)
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
$Features = (Get-WinUtilCheckBoxes)["WPFFeature"]
|
||||
if ($FeatureConfig) {
|
||||
$Features = $FeatureConfig
|
||||
} else {
|
||||
$Features = (Get-WinUtilCheckBoxes)["WPFFeature"]
|
||||
}
|
||||
|
||||
Invoke-WPFRunspace -ArgumentList $Features -DebugPreference $DebugPreference -ScriptBlock {
|
||||
param($Features, $DebugPreference)
|
||||
|
@ -6,14 +6,22 @@ function Invoke-WPFInstall {
|
||||
|
||||
#>
|
||||
|
||||
param (
|
||||
$InstallConfig
|
||||
)
|
||||
|
||||
if($sync.ProcessRunning) {
|
||||
$msg = "[Invoke-WPFInstall] An Install process is currently running."
|
||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||
return
|
||||
}
|
||||
|
||||
$PackagesToInstall = (Get-WinUtilCheckBoxes)["Install"]
|
||||
Write-Host $PackagesToInstall
|
||||
if ($InstallConfig) {
|
||||
$PackagesToInstall = $InstallConfig
|
||||
} else {
|
||||
$PackagesToInstall = (Get-WinUtilCheckBoxes)["Install"]
|
||||
}
|
||||
|
||||
if ($PackagesToInstall.Count -eq 0) {
|
||||
$WarningMsg = "Please select the program(s) to install or upgrade"
|
||||
[System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||
|
@ -6,13 +6,21 @@ function Invoke-WPFtweaksbutton {
|
||||
|
||||
#>
|
||||
|
||||
param (
|
||||
$TweaksConfig
|
||||
)
|
||||
|
||||
if($sync.ProcessRunning) {
|
||||
$msg = "[Invoke-WPFtweaksbutton] Install process is currently running."
|
||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||
return
|
||||
}
|
||||
|
||||
$Tweaks = (Get-WinUtilCheckBoxes)["WPFTweaks"]
|
||||
if ($TweaksConfig) {
|
||||
$Tweaks = $TweaksConfig
|
||||
} else {
|
||||
$Tweaks = (Get-WinUtilCheckBoxes)["WPFTweaks"]
|
||||
}
|
||||
|
||||
Set-WinUtilDNS -DNSProvider $sync["WPFchangedns"].text
|
||||
|
||||
|
Reference in New Issue
Block a user