Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better README.md for mods #76

Merged
merged 3 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ but most of the time, winget does not manage silent uninstall correcty.

## Custom (Mods)

The Mods feature allows you to run additional scripts before/when/after installing, upgrading or uninstalling an app.
Just put the script with the App ID followed by the suffix to be considered in the Mods directory:
`AppID-preinstall.ps1`, `AppID-upgrade.ps1`, `AppID-install.ps1`, `AppID-installed-once.ps1`, `AppID-installed.ps1`, `AppID-preuninstall.ps1`, `AppID-uninstall.ps1` or `AppID-uninstalled.ps1`
The **Mods feature** allows you to run additional scripts before/when/after installing or uninstalling an app.
Just put the script with the **AppID** followed by the suffix to be considered in the **Mods directory**:
**AppID**`-preinstall.ps1`, `-install.ps1`, `-installed-once.ps1`, `-installed.ps1`, `-preuninstall.ps1`, `-uninstall.ps1` or `-uninstalled.ps1`

> Example:
> Runs before install: `AppID-preinstall.ps1`
Expand All @@ -55,11 +55,11 @@ Just put the script with the App ID followed by the suffix to be considered in t
> Runs during uninstall (before uninstall check): `AppID-uninstall.ps1`
> Runs after uninstall has been confirmed: `AppID-uninstalled.ps1`

If your using WAU (Winget-AutoUpdate) `AppID-preinstall.ps1`, `AppID-install.ps1`, `AppID-upgrade.ps1` and `AppID-installed.ps1` get copied to the WAU mods directory and runs when upgrading apps.
If you're using [**WAU** (Winget-AutoUpdate)](https://github.com/Romanitho/Winget-AutoUpdate) they get copied to the **WAU mods** directory (except `-installed-once.ps1` and `-uninstall.ps1`) and also runs when upgrading apps in **WAU**.

`AppID-installed-once.ps1` runs instead of `AppID-installed.ps1` from Winget-Install and doesn't get copied to the WAU mods directory.
`AppID-installed-once.ps1` runs instead of `AppID-installed.ps1` from **Winget-Install** and doesn't get copied to the **WAU mods** directory.

They are deleted from WAU on an uninstall (if not externally managed).
They are deleted from **WAU** on an uninstall (if deployed from **Winget-Install**)

## Other ideas and approaches
https://github.com/o-l-a-v/winget-intune-win32
8 changes: 6 additions & 2 deletions mods/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Pre/During/Post install/uninstall custom scripts should be placed here.
A script Template and Mods Functions are included as example to get you started...
A script **Template** and **Mods Functions** are included as **example** to get you started...

Scripts that are considered:
**AppID**`-preinstall.ps1`, `-install.ps1`, `-installed-once.ps1`, `-installed.ps1`, `-preuninstall.ps1`, `-uninstall.ps1` or `-uninstalled.ps1`
**AppID**`-preinstall.ps1`, `-install.ps1`, `-installed-once.ps1`, `-installed.ps1`, `-preuninstall.ps1`, `-uninstall.ps1` or `-uninstalled.ps1`

If you're using [**WAU** (Winget-AutoUpdate)](https://github.com/Romanitho/Winget-AutoUpdate) they get copied to the **WAU mods** directory (except `-installed-once.ps1` and `-uninstall.ps1`) and also runs when upgrading apps in **WAU**.

They are deleted from **WAU** on an uninstall (if deployed from **Winget-Install**)