Skip to content

Commit 111aab2

Browse files
authored
Merge pull request #992 from Romanitho/release/2.6.0
Release 2.6.0
2 parents 8835ced + 0a1448f commit 111aab2

File tree

18 files changed

+1046
-355
lines changed

18 files changed

+1046
-355
lines changed

.github/workflows/GA_Mega-linter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
id: ml
4444
# You can override MegaLinter flavor used to have faster performances
4545
# More info at https://megalinter.github.io/flavors/
46-
uses: oxsecurity/megalinter@5a91fb06c83d0e69fbd23756d47438aa723b4a5a # v8.7.0
46+
uses: oxsecurity/megalinter@e08c2b05e3dbc40af4c23f41172ef1e068a7d651 # v8.8.0
4747
env:
4848
# All available variables are described in documentation
4949
# https://megalinter.github.io/configuration/
@@ -90,7 +90,7 @@ jobs:
9090
run: sudo chown -Rc $UID .git/
9191
- name: Commit and push applied linter fixes
9292
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
93-
uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5.2.0
93+
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
9494
with:
9595
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
9696
commit_message: "[MegaLinter] Apply linters fixes"

.github/workflows/GitFlow_Make-Release-and-Sync-to-Dev.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ jobs:
2424
# Run only when PR is merged (not just closed) and source branch is release/* or hotfix/*
2525
if: github.event.pull_request.merged == true && (startsWith(github.event.pull_request.head.ref, 'release/') || startsWith(github.event.pull_request.head.ref, 'hotfix/'))
2626
runs-on: windows-latest
27+
outputs:
28+
next_semver: ${{ steps.release_version.outputs.NextSemVer }}
2729
steps:
2830
# Step 1: Checkout the code from the main branch after merge
2931
- name: Checkout code
30-
uses: actions/checkout@v4.2.2
32+
uses: actions/checkout@v4
3133
with:
3234
lfs: "true"
3335
fetch-depth: 0
34-
token: ${{ secrets.GITHUB_TOKEN }}
3536

3637
# Step 2: Extract version from branch name and calculate build number
3738
- name: Get final Release Version
@@ -112,7 +113,7 @@ jobs:
112113
113114
# Step 4: Create stable GitHub release with all artifacts
114115
- name: Create release
115-
uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 # v1.16.0
116+
uses: ncipollo/release-action@bcfe5470707e8832e12347755757cec0eb3c22af # v1.18.0
116117
with:
117118
tag: v${{ steps.release_version.outputs.NextSemVer }}
118119
prerelease: false # This is a stable release
@@ -134,10 +135,11 @@ jobs:
134135
needs: build
135136
steps:
136137
- name: Checkout code
137-
uses: actions/checkout@v4.2.2
138+
uses: actions/checkout@v4
138139
with:
139140
fetch-depth: 0
140-
141+
token: ${{ secrets.GH_PAT_SYNC }}
142+
141143
# Step 5: Configure Git for merge back to develop
142144
- name: Configure Git
143145
shell: bash
@@ -152,9 +154,8 @@ jobs:
152154
# Checkout develop branch
153155
git checkout develop
154156
git pull origin develop
155-
156157
# Merge main into develop with no fast-forward to preserve history
157-
git merge --no-ff origin/main -m "Merge main into develop after the creation of release v${{ steps.release_version.outputs.NextSemVer }}"
158+
git merge --no-ff origin/main -m "Merge main into develop after the creation of release v${{ needs.build.outputs.next_semver }}"
158159
159160
# Push changes to develop branch
160161
git push origin develop

README.md

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ List and Mods folder content will be copied to WAU install location:
4242

4343

4444
### Notification Level
45-
You can choose which notification will be displayed: `Full`, `Success only` or `None`.
45+
You can choose which notification will be displayed: `Full`, `Success only`, `Errors only` or `None`.
4646

4747
### Notification language
4848
You can easily translate toast notifications by creating your locale xml config file (and share it with us :) ).
@@ -147,7 +147,7 @@ Set `DESKTOPSHORTCUT=1` to create a shortcut for user interaction on the Desktop
147147
Set `STARTMENUSHORTCUT=1` to create shortcuts for user interaction in the Start Menu to run task `Winget-AutoUpdate` and open Logs.
148148

149149
### NOTIFICATIONLEVEL
150-
Specify the Notification level: Full (Default, displays all notification), SuccessOnly (Only displays notification for success) or None (Does not show any popup).
150+
Specify the Notification level: Full (Default, displays all notification), SuccessOnly (Only displays notification for success), ErrorsOnly (Only displays notification for errors) or None (Does not show any popup).
151151

152152
### UPDATESATLOGON
153153
Default value 1. Set `UPDATESATLOGON=0` to disable WAU from running at user logon.
@@ -158,6 +158,11 @@ Default value Never. Specify the update frequency: Daily, BiDaily, Weekly, BiWee
158158
### UPDATESATTIME
159159
Default value 6AM (06:00:00). Specify the time of the update interval execution time. Example `UPDATESATTIME="11:00:00"`
160160

161+
### UPDATESATTIMEDELAY
162+
Default value is none (00:00). This setting specifies the delay for the scheduled task.
163+
A scheduled task random delay adds a random amount of wait time (up to the specified maximum) before the task starts.
164+
This helps prevent many devices from running the task at the exact same time. This is not applicable to "on logon" triggers.
165+
161166
### DONOTRUNONMETERED
162167
Default value 1. Set `DONOTRUNONMETERED=0` to force WAU to run on metered connections. May add cellular data costs on shared connexion from smartphone for example.
163168

@@ -175,10 +180,25 @@ Default is 1048576 = 1 MB (ca. 7500 lines)
175180
Specify Winget-AutoUpdate installation location. Default: `C:\Program Files\Winget-AutoUpdate` (Recommended to leave default).
176181

177182
### Deploy with Intune
178-
You can use [Winget-Install](https://github.com/Romanitho/Winget-AutoUpdate/blob/main/Sources/Winget-AutoUpdate/Winget-Install.ps1) to deploy the package for example in Intune:
183+
You can use [Winget-Install](https://github.com/Romanitho/Winget-AutoUpdate/blob/main/Sources/Winget-AutoUpdate/Winget-Install.ps1) to deploy the package (this example with an override of parameters):
184+
```batch
185+
"%systemroot%\sysnative\WindowsPowerShell\v1.0\powershell.exe" -noprofile -executionpolicy bypass -file "C:\Program Files\Winget-AutoUpdate\Winget-Install.ps1" -AppIDs "Adobe.Acrobat.Reader.64-bit --scope machine --override \"-sfx_nu /sAll /rs /msi EULA_ACCEPT=YES DISABLEDESKTOPSHORTCUT=1""
186+
```
187+
### Deploy with SCCM
188+
You can also use [Winget-Install](https://github.com/Romanitho/Winget-AutoUpdate/blob/main/Sources/Winget-AutoUpdate/Winget-Install.ps1) to deploy the same package in **SCCM**:
179189
```batch
180-
"%systemroot%\sysnative\WindowsPowerShell\v1.0\powershell.exe" -noprofile -executionpolicy bypass -file "C:\Program Files\Winget-AutoUpdate\Winget-Install.ps1" -AppIDs "Romanitho.Winget-AutoUpdate --scope machine --override \"/qn RUN_WAU=YES USERCONTEXT=1 STARTMENUSHORTCUT=1 NOTIFICATIONLEVEL=SuccessOnly UPDATESINTERVAL=Daily""
190+
powershell.exe -noprofile -executionpolicy bypass -file "C:\Program Files\Winget-AutoUpdate\Winget-Install.ps1" -AppIDs "Adobe.Acrobat.Reader.64-bit --scope machine --override \"-sfx_nu /sAll /rs /msi EULA_ACCEPT=YES DISABLEDESKTOPSHORTCUT=1""
181191
```
192+
Instead of including the override parameters in the install string you can use a **Mod** (**mods\Adobe.Acrobat.Reader.64-bit-override.txt**) with the content:
193+
```batch
194+
"-sfx_nu /sAll /rs /msi EULA_ACCEPT=YES DISABLEDESKTOPSHORTCUT=1"
195+
```
196+
* A standard single installation: **-AppIDs Notepad++.Notepad++**
197+
* Multiple installations: **-AppIDs "7zip.7zip, Notepad++.Notepad++"**
198+
199+
As a custom detection script you can download/edit [winget-detect.ps1](Sources/Tools/Detection/winget-detect.ps1) (change app to detect [**Application ID**]) in **Intune**/**SCCM**
200+
201+
A nice feature is if you're already using the deprecated standalone script **winget-install.ps1** from the [old repo](https://github.com/Romanitho/Winget-Install) and have placed it somwhere locally on all clients you can make a **SymLink** in its place and keep using the old path (avoiding a lot of work) in your deployed applications (**Winget-Install.ps1** takes care of the SymLink logic).
182202

183203
## GPO / Intune Management
184204
Read more in the [Policies section](https://github.com/Romanitho/Winget-AutoUpdate/tree/main/Sources/Policies).
@@ -189,8 +209,14 @@ Read more in the [Policies section](https://github.com/Romanitho/Winget-AutoUpda
189209
This script executes **if the network is active/any version of Winget is installed/WAU is running as SYSTEM**.<br>
190210
If **ExitCode** is **1** from `_WAU-mods.ps1` then **Re-run WAU**.
191211

212+
In addition to this legacy handling, a new action-based system is now supported.<br>
213+
This system lets you define multiple actions and conditions directly in your mod scripts, enabling more advanced automation and control over the WAU process.<br>
214+
With actions, you can execute different scripts, check results, and control the WAU flow with greater flexibility and improved logging compared to relying solely on **Exit Code**.
215+
192216
Likewise `_WAU-mods-postsys.ps1` can be used to do things at the end of the **SYSTEM context WAU** process before the user run.
193217

218+
You can find more information in [README Mods for WAU](Sources/Winget-AutoUpdate/mods/README.md)
219+
194220
## Custom scripts (Mods feature for Apps)
195221
The Mods feature allows you to run additional scripts when upgrading or installing an app.
196222
Just put the scripts in question with the **AppID** followed by the `-preinstall`, `-upgrade`, `-install`, `-installed` or `-notinstalled` suffix in the **mods** folder.
@@ -207,18 +233,24 @@ The **-install** mod will be used for upgrades too if **-upgrade** doesn't exist
207233
> Example:<br>
208234
If you want to run a script that removes the shortcut from **%PUBLIC%\Desktop** (we don't want to fill the desktop with shortcuts our users can't delete) just after installing **Acrobat Reader DC** (32-bit), prepare a powershell script that removes the Public Desktop shortcut **Acrobat Reader DC.lnk** and name your script like this: `Adobe.Acrobat.Reader.32-bit-installed.ps1` and put it in the **mods** folder.
209235

210-
You can find more information on [Winget-Install Repo](https://github.com/Romanitho/Winget-AutoUpdate?tab=readme-ov-file#custom-script-mods-for-wau), as it's a related feature.<br>
211-
Read more in the `README.md` under the directory **mods**.
236+
You can find more information in [README Mods for WAU](Sources/Winget-AutoUpdate/mods/README.md), as it's a related feature.
212237

213238
Share your mods with the community:<br>
214239
<https://github.com/Romanitho/Winget-AutoUpdate/discussions/categories/mods>
215240

216241
### Winget native parameters
217242
Another finess is the **AppID** followed by the `-override` suffix as a **text file** (.**txt**) that you can place under the **mods** folder.
218243
> Example:<br>
219-
**Canneverbe.CDBurnerXP-override.txt** with the content `ADDLOCAL=All REMOVE=Desktop_Shortcut /qn`
244+
**Adobe.Acrobat.Reader.64-bit-override.txt** with the content `"-sfx_nu /sAll /rs /msi EULA_ACCEPT=YES DISABLEDESKTOPSHORTCUT=1"`
245+
246+
This will use the **content** of the text file as a native **winget --override** parameter when upgrading.
247+
248+
Likewise you can use the **AppID** followed by the `-custom` suffix as a **text file** (.**txt**) that you can place under the **mods** folder (*Arguments to be passed on to the installer in addition to the defaults*).
249+
> Example:<br>
250+
**Adobe.Acrobat.Reader.64-bit-custom.txt** with the content `"DISABLEDESKTOPSHORTCUT=1"`
251+
252+
This will use the **content** of the text file as a native **winget --custom** parameter when upgrading.
220253

221-
This will use the **content** of the text file as a native **winget --override** parameter when upgrading (as proposed by [JonNesovic](https://github.com/JonNesovic) in [Mod for --override argument #244](https://github.com/Romanitho/Winget-AutoUpdate/discussions/244#discussion-4637666)).
222254

223255
## Known issues
224256
* As reported by [soredake](https://github.com/soredake), Powershell from MsStore is not supported with WAU in system context. See <https://github.com/Romanitho/Winget-AutoUpdate/issues/113>

Sources/Policies/ADMX/WAU.admx

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<policyDefinitions xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="4.9"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="5.0"
44
schemaVersion="1.0" xmlns="http://www.microsoft.com/GroupPolicy/PolicyDefinitions">
55
<policyNamespaces>
66
<target prefix="WAU" namespace="Romanitho.Policies.WAU" />
@@ -10,6 +10,7 @@
1010
<definitions>
1111
<definition name="SUPPORTED_WAU_1_16_0" displayName="$(string.SUPPORTED_WAU_1_16_0)" />
1212
<definition name="SUPPORTED_WAU_1_16_5" displayName="$(string.SUPPORTED_WAU_1_16_5)" />
13+
<definition name="SUPPORTED_WAU_2_6_0" displayName="$(string.SUPPORTED_WAU_2_6_0)" />
1314
<definition name="SUPPORTED_WAU_EXPERIMENTAL"
1415
displayName="$(string.SUPPORTED_WAU_EXPERIMENTAL)" />
1516
</definitions>
@@ -163,6 +164,11 @@
163164
<string>SuccessOnly</string>
164165
</value>
165166
</item>
167+
<item displayName="$(string.NotificationLevel_ErrorsOnly)">
168+
<value>
169+
<string>ErrorsOnly</string>
170+
</value>
171+
</item>
166172
<item displayName="$(string.NotificationLevel_None)">
167173
<value>
168174
<string>None</string>
@@ -366,31 +372,6 @@
366372
<decimal value="0" />
367373
</disabledValue>
368374
</policy>
369-
<policy name="DesktopShortcut_Enable" class="Machine"
370-
displayName="$(string.DesktopShortcut_Name)" explainText="$(string.DesktopShortcut_Explain)"
371-
key="Software\Policies\Romanitho\Winget-AutoUpdate" valueName="WAU_DesktopShortcut">
372-
<parentCategory ref="WAU" />
373-
<supportedOn ref="WAU:SUPPORTED_WAU_1_16_0" />
374-
<enabledValue>
375-
<decimal value="1" />
376-
</enabledValue>
377-
<disabledValue>
378-
<decimal value="0" />
379-
</disabledValue>
380-
</policy>
381-
<policy name="StartMenuShortcut_Enable" class="Machine"
382-
displayName="$(string.StartMenuShortcut_Name)"
383-
explainText="$(string.StartMenuShortcut_Explain)"
384-
key="Software\Policies\Romanitho\Winget-AutoUpdate" valueName="WAU_StartMenuShortcut">
385-
<parentCategory ref="WAU" />
386-
<supportedOn ref="WAU:SUPPORTED_WAU_1_16_0" />
387-
<enabledValue>
388-
<decimal value="1" />
389-
</enabledValue>
390-
<disabledValue>
391-
<decimal value="0" />
392-
</disabledValue>
393-
</policy>
394375
<policy name="MaxLogFiles_Name" class="Machine" displayName="$(string.MaxLogFiles_Name)"
395376
explainText="$(string.MaxLogFiles_Explain)"
396377
key="Software\Policies\Romanitho\Winget-AutoUpdate" presentation="$(presentation.MaxLogFiles)">
@@ -420,5 +401,16 @@
420401
<text id="WingetSourceCustom" valueName="WAU_WingetSourceCustom" />
421402
</elements>
422403
</policy>
404+
<policy name="UpdatesTime_Delay" class="Machine"
405+
displayName="$(string.UpdatesTimeDelay_Name)"
406+
explainText="$(string.UpdatesTimeDelay_Explain)"
407+
key="Software\Policies\Romanitho\Winget-AutoUpdate"
408+
presentation="$(presentation.UpdatesTimeDelayTime)">
409+
<parentCategory ref="WAU" />
410+
<supportedOn ref="WAU:SUPPORTED_WAU_2_6_0" />
411+
<elements>
412+
<text id="UpdatesTimeDelayTime" valueName="WAU_UpdatesTimeDelay" />
413+
</elements>
414+
</policy>
423415
</policies>
424-
</policyDefinitions>
416+
</policyDefinitions>

0 commit comments

Comments
 (0)