From 013e66ebdc3b9079ce1bbfdc8ee40e17afdf1f02 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Sat, 4 Feb 2023 01:08:38 +0100 Subject: [PATCH 1/9] Corrected and Safe --- README.md | 3 + Winget-AutoUpdate-Install.ps1 | 13 +- Winget-AutoUpdate/Winget-Upgrade.ps1 | 112 +++++++++--------- .../functions/Get-WingetOutdatedApps.ps1 | 2 +- .../functions/Invoke-PostUpdateActions.ps1 | 12 ++ 5 files changed, 85 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index 39c476a..2e7547c 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,9 @@ Thanks to [Weatherlights](https://github.com/Weatherlights) in [#256 (reply in t **-ModsPath** Get Mods from external Path (**URL/UNC/Local**) - download/copy to `mods` in Winget-AutoUpdate installation location if external mods are newer. +Security: +If -ModsPath is used during installation WAU assumes it's an enterprise environment and adds a **Deny rule** to the file rights for the directory `mods` for **Local Users** (SID: S-1-5-32-545) making it impossible to implement own scripts that can be executed in **SYSTEM** context. + For **URL**: This requires a site directory with **Directory Listing Enabled** and no index page overriding the listing of files (or an index page with href listing of all the **Mods** to be downloaded): ```