mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-06-04 14:17:27 +00:00
Added -Preset for automation (#4539)
* Update start.ps1 * Update main.ps1 * Update start.ps1 * Update start.ps1 * Update main.ps1 * Update main.ps1 * Update _index.md * Update _index.md * Update _index.md * Update README.md * Update main.ps1 * Update start.ps1 * Update main.ps1 * Update main.ps1 * Update start.ps1 * Update main.ps1 * Update main.ps1 * Update main.ps1 * Update main.ps1
This commit is contained in:
@@ -68,6 +68,23 @@ $sync.configs.applications.PSObject.Properties | ForEach-Object {
|
||||
|
||||
Set-Preferences
|
||||
|
||||
if ($Preset) {
|
||||
Show-CTTLogo
|
||||
|
||||
# Selects the tweaks from $Preset varible
|
||||
Update-WinUtilSelections -flatJson $sync.configs.preset.$Preset
|
||||
|
||||
# Run tweaks that were selected by Update-WinUtilSelections
|
||||
Invoke-WinUtilAutoRun
|
||||
|
||||
# Cleanup and exit
|
||||
$sync.runspace.Dispose()
|
||||
$sync.runspace.Close()
|
||||
[System.GC]::Collect()
|
||||
Stop-Transcript
|
||||
return
|
||||
}
|
||||
|
||||
if ($PARAM_NOUI) {
|
||||
Show-CTTLogo
|
||||
if ($PARAM_CONFIG -and -not [string]::IsNullOrWhiteSpace($PARAM_CONFIG)) {
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
param (
|
||||
[string]$Config,
|
||||
[ValidateSet("Standard", "Minimal", "Advanced")]
|
||||
[string]$Preset,
|
||||
[switch]$Noui,
|
||||
[switch]$Offline
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user