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:
@@ -35,6 +35,23 @@ irm "https://christitus.com/win" | iex
|
|||||||
irm "https://christitus.com/windev" | iex
|
irm "https://christitus.com/windev" | iex
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Automation
|
||||||
|
|
||||||
|
Winutil also supports predefined presets that apply common configurations automatically:
|
||||||
|
|
||||||
|
- `Standard`
|
||||||
|
- `Minimal`
|
||||||
|
- `Advanced`
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
& ([ScriptBlock]::Create((irm "https://christitus.com/win"))) -Preset Standard
|
||||||
|
```
|
||||||
|
|
||||||
|
To view exactly what each preset does, see:
|
||||||
|
https://github.com/ChrisTitusTech/winutil/blob/main/config/preset.json
|
||||||
|
|
||||||
If you have Issues, refer to [Known Issues](https://winutil.christitus.com/knownissues/) or [Create Issue](https://github.com/ChrisTitusTech/winutil/issues)
|
If you have Issues, refer to [Known Issues](https://winutil.christitus.com/knownissues/) or [Create Issue](https://github.com/ChrisTitusTech/winutil/issues)
|
||||||
|
|
||||||
## 🎓 Documentation
|
## 🎓 Documentation
|
||||||
|
|||||||
@@ -7,7 +7,22 @@ next: /userguide/win11creator/
|
|||||||
|
|
||||||
Use Automation to run Winutil from an exported configuration file.
|
Use Automation to run Winutil from an exported configuration file.
|
||||||
|
|
||||||
To create a config file:
|
Winutil supports predefined presets that apply common configurations automatically:
|
||||||
|
|
||||||
|
- `Standard`
|
||||||
|
- `Minimal`
|
||||||
|
- `Advanced`
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
& ([ScriptBlock]::Create((irm "https://christitus.com/win"))) -Preset Standard
|
||||||
|
```
|
||||||
|
|
||||||
|
To view exactly what each preset does, see:
|
||||||
|
https://github.com/ChrisTitusTech/winutil/blob/main/config/preset.json
|
||||||
|
|
||||||
|
To create you're own config file:
|
||||||
|
|
||||||
1. Open Winutil.
|
1. Open Winutil.
|
||||||
2. Click the gear icon in the top-right corner.
|
2. Click the gear icon in the top-right corner.
|
||||||
|
|||||||
@@ -68,6 +68,23 @@ $sync.configs.applications.PSObject.Properties | ForEach-Object {
|
|||||||
|
|
||||||
Set-Preferences
|
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) {
|
if ($PARAM_NOUI) {
|
||||||
Show-CTTLogo
|
Show-CTTLogo
|
||||||
if ($PARAM_CONFIG -and -not [string]::IsNullOrWhiteSpace($PARAM_CONFIG)) {
|
if ($PARAM_CONFIG -and -not [string]::IsNullOrWhiteSpace($PARAM_CONFIG)) {
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
param (
|
param (
|
||||||
[string]$Config,
|
[string]$Config,
|
||||||
|
[ValidateSet("Standard", "Minimal", "Advanced")]
|
||||||
|
[string]$Preset,
|
||||||
[switch]$Noui,
|
[switch]$Noui,
|
||||||
[switch]$Offline
|
[switch]$Offline
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user