Template, README and text
parent
6530b2d449
commit
b341ca25b2
|
@ -173,11 +173,8 @@ See https://github.com/Romanitho/Winget-AutoUpdate/discussions/88
|
||||||
|
|
||||||
## Custom script (Mods for WAU)
|
## 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.
|
**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**.
|
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**.
|
If **ExitCode** is **1** from `_WAU-mods.ps1` then **Re-run WAU**.
|
||||||
|
|
||||||
## Custom scripts (Mods feature for Apps)
|
## 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.
|
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.
|
Just put the scripts in question with the **AppID** followed by the `-preinstall`, `-upgrade`, `-install` or `-installed` suffix in the **mods** folder.
|
||||||
|
|
|
@ -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"
|
$Mods = "$WorkingDir\mods"
|
||||||
if (Test-Path "$Mods\_WAU-mods.ps1") {
|
if (Test-Path "$Mods\_WAU-mods.ps1") {
|
||||||
Write-ToLog "Running Mods for WAU..." "Yellow"
|
Write-ToLog "Running Mods for WAU..." "Yellow"
|
||||||
|
|
|
@ -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:
|
### Pre/During/Post install/uninstall:
|
||||||
Custom scripts should be placed here.
|
Custom scripts should be placed here.
|
||||||
A script **Template** and **Mods Functions** are included as an **example** to get you started...
|
A script **Template** and **Mods Functions** are included as an **example** to get you started...
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue