Skip to content

WAU Mods

Göran Axel Johannesson edited this page Oct 8, 2025 · 3 revisions

  1. Custom Scripts for WAU
  2. App-specific Mods

Custom Scripts for WAU

  • Placed in mods folder and executes if 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
  • New action-based system is now supported that allows multiple actions and conditions directly in mod script for advanced automation and better control over the WAU process
  • _WAU-mods-postsys.ps1 can be used for actions at the end of the SYSTEM context WAU process before user run
  • Templates available: _WAU-mods-template.ps1 and _WAU-mods-postsys-template.ps1

App-specific Mods

Scripts placed in mods folder with AppID followed by suffix:

Execution order:

  • AppID-preinstall.ps1 - Runs before upgrade/install
  • AppID-upgrade.ps1 or AppID-install.ps1 - Runs during upgrade/install (before install check)
  • AppID-installed.ps1 - Runs after upgrade/install has been confirmed
  • AppID-notinstalled.ps1 - Runs after a failed upgrade/install
  • _WAU-notinstalled.ps1 - Global fallback for failed installations (overridden by individual AppID-notinstalled.ps1)
  • Templates available: _AppID-template.ps1 and _WAU-notinstalled-template.ps1

Uninstall support (for use with Winget-Install):

  • AppID-preuninstall.ps1, AppID-uninstall.ps1, AppID-uninstalled.ps1

Important notes:

  • -install mod will be used for upgrades too if -upgrade doesn't exist
  • AppID-install.ps1 is recommended because it's used in both scenarios
  • If AppID-preinstall.ps1 or AppID-preuninstall.ps1 returns $false, the install/update/uninstall for that AppID is skipped

Winget Native Parameters

Override parameters:

  • Text file: AppID-override.txt in mods folder
  • Example: Adobe.Acrobat.Reader.64-bit-override.txt with content:
    "-sfx_nu /sAll /rs /msi EULA_ACCEPT=YES DISABLEDESKTOPSHORTCUT=1"
    
  • Used as winget --override parameter

Custom parameters:

  • Text file: AppID-custom.txt in mods folder
  • Example: ShareX.ShareX-custom.txt with content:
    /MERGETASKS=!CreateDesktopIcon
    
  • Used as winget --custom parameter (arguments in addition to defaults)