Files
winutil/functions/public/Invoke-WinUtilAutoRun.ps1
T

35 lines
744 B
PowerShell
Raw Normal View History

2026-02-22 17:28:55 -06:00
function Invoke-WinUtilAutoRun {
<#
.SYNOPSIS
Runs Install, Tweaks, and Features with optional UI invocation.
#>
function BusyWait {
2026-05-12 10:58:46 -07:00
Start-Sleep -Milliseconds 100
2026-02-22 17:28:55 -06:00
while ($sync.ProcessRunning) {
2026-05-12 10:58:46 -07:00
Start-Sleep -Milliseconds 100
2026-02-22 17:28:55 -06:00
}
2026-05-12 10:58:46 -07:00
}
2026-02-22 17:28:55 -06:00
2026-05-12 10:58:46 -07:00
if ($sync.selectedTweaks.Count -gt 0) {
Write-Host "Applying tweaks..."
Invoke-WPFtweaksbutton
BusyWait
2026-02-22 17:28:55 -06:00
}
2026-05-12 10:58:46 -07:00
if ($sync.selectedFeatures.Count -gt 0) {
Write-Host "Applying features..."
Invoke-WPFFeatureInstall
BusyWait
}
2026-02-22 17:28:55 -06:00
2026-05-12 10:58:46 -07:00
if ($sync.selectedApps.Count -gt 0) {
Write-Host "Installing applications..."
Invoke-WPFInstall
BusyWait
}
2026-02-22 17:28:55 -06:00
Write-Host "Done."
}