Template, README and text

pull/386/head
KnifMelti 2023-09-04 00:47:31 +02:00
parent 6530b2d449
commit b341ca25b2
4 changed files with 24 additions and 6 deletions

View File

@ -172,12 +172,9 @@ Remove scheduled tasks and scripts.
See https://github.com/Romanitho/Winget-AutoUpdate/discussions/88
## Custom script (Mods for WAU)
**Mods for WAU** allows you to craft a script to do whatever you like via `_WAU-mods.ps1` in the **mods** folder.
This script executes **if the network is active/any version of Winget is installed/WAU is running as SYSTEM**.
**Mods for WAU** allows you to craft a script to do whatever you like via `_WAU-mods.ps1` in the **mods** folder.
This script executes **if the network is active/any version of Winget is installed/WAU is running as SYSTEM**.
If **ExitCode** is **1** from `_WAU-mods.ps1` then **Re-run WAU**.
## Custom scripts (Mods feature for Apps)
From version 1.8.0, the Mods feature allows you to run additional scripts when upgrading or installing an app.
Just put the scripts in question with the **AppID** followed by the `-preinstall`, `-upgrade`, `-install` or `-installed` suffix in the **mods** folder.

View File

@ -178,7 +178,7 @@ if (Test-Network) {
}
}
#Test if _WAU-mods.ps1 exist (Mods for WAU if Network is active/any Winget is installed/running as SYSTEM)
#Test if _WAU-mods.ps1 exist: Mods for WAU (if Network is active/any Winget is installed/running as SYSTEM)
$Mods = "$WorkingDir\mods"
if (Test-Path "$Mods\_WAU-mods.ps1") {
Write-ToLog "Running Mods for WAU..." "Yellow"

View File

@ -1,3 +1,7 @@
### Mods for WAU (if Network is active/any Winget is installed/running as SYSTEM):
Custom script should be placed here.
A script **Template** `_WAU-mods-template.ps1` is included to get you started.
Rename it to `_WAU-mods.ps1` if you want to activate/run it via `Winget-Upgrade.ps1`.
### Pre/During/Post install/uninstall:
Custom scripts should be placed here.
A script **Template** and **Mods Functions** are included as an **example** to get you started...

View File

@ -0,0 +1,17 @@
#Mods for WAU (if Network is active/any Winget is installed/running as SYSTEM)
#Winget-Upgrade.ps1 calls this script with the code:
#[Write-ToLog "Running Mods for WAU..." "Yellow"
#& "$Mods\_WAU-mods.ps1"]
#Exit 1 to Re-run WAU from this script!
<# FUNCTIONS #>
<# ARRAYS/VARIABLES #>
<# MAIN #>
Write-ToLog "...everything's already been done!" "Green"
Exit 0