mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-06-04 14:17:27 +00:00
fix import (#4447)
* Made -Config use Runspaces main.ps1 * Fix no-UI config autorun * Skip empty no-UI autorun sections * Update Invoke-WinUtilAutoRun.ps1 * Ignore blank DNS selection during autorun * Update main.ps1 * Update Invoke-WPFRunspace.ps1 * Update Invoke-WPFRunspace.ps1 * Update Invoke-WinUtilAutoRun.ps1 * Update Invoke-WinUtilAutoRun.ps1 * Update Invoke-WPFtweaksbutton.ps1 * Update start.ps1 * Update main.ps1 * Update Invoke-WPFtweaksbutton.ps1 * Update Invoke-WPFRunspace.ps1 * Update _index.md * Merge branch 'ChrisTitusTech:main' into patch-3 * Merge branch 'ChrisTitusTech:main' into patch-3
This commit is contained in:
+3
-7
@@ -75,12 +75,8 @@ if ($PARAM_NOUI) {
|
||||
if ($PARAM_CONFIG -and -not [string]::IsNullOrWhiteSpace($PARAM_CONFIG)) {
|
||||
Write-Host "Running config file tasks..."
|
||||
Invoke-WPFImpex -type "import" -Config $PARAM_CONFIG
|
||||
if ($PARAM_RUN) {
|
||||
Invoke-WinUtilAutoRun
|
||||
}
|
||||
else {
|
||||
Write-Host "Did you forget to add '--Run'?";
|
||||
}
|
||||
Invoke-WinUtilAutoRun
|
||||
|
||||
$sync.runspace.Dispose()
|
||||
$sync.runspace.Close()
|
||||
[System.GC]::Collect()
|
||||
@@ -386,7 +382,7 @@ $sync["Form"].Add_ContentRendered({
|
||||
if ($PARAM_CONFIG -and -not [string]::IsNullOrWhiteSpace($PARAM_CONFIG)) {
|
||||
Write-Host "Running config file tasks..."
|
||||
Invoke-WPFImpex -type "import" -Config $PARAM_CONFIG
|
||||
if ($PARAM_RUN) {
|
||||
Invoke-WPFRunspace -ScriptBlock {
|
||||
Invoke-WinUtilAutoRun
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
param (
|
||||
[string]$Config,
|
||||
[switch]$Run,
|
||||
[switch]$Noui,
|
||||
[switch]$Offline
|
||||
)
|
||||
@@ -17,12 +16,6 @@ if ($Config) {
|
||||
$PARAM_CONFIG = $Config
|
||||
}
|
||||
|
||||
$PARAM_RUN = $false
|
||||
# Handle the -Run switch
|
||||
if ($Run) {
|
||||
$PARAM_RUN = $true
|
||||
}
|
||||
|
||||
$PARAM_NOUI = $false
|
||||
if ($Noui) {
|
||||
$PARAM_NOUI = $true
|
||||
|
||||
Reference in New Issue
Block a user