diff --git a/.github/workflows/WAU-AutoCreatePreVersion.yml b/.github/workflows/WAU-AutoCreatePreVersion.yml deleted file mode 100644 index ba189e7..0000000 --- a/.github/workflows/WAU-AutoCreatePreVersion.yml +++ /dev/null @@ -1,125 +0,0 @@ ---- -name: WAU - Auto Create Pre-Release Version - -on: - schedule: - - cron: "0 0 * * *" - -permissions: - contents: write - -jobs: - check_merged: - name: Compare latest merge and tag - runs-on: ubuntu-latest - outputs: - should_run: ${{ steps.should_run.outputs.SHOULD_RUN }} - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Check if latest merged is older than latest tag - id: should_run - run: | - echo "Latest tag:" - git log --tags --pretty="%ci - %h - %s %d" -n 1 - LATEST_TAG_DATE=$(git log --tags -n 1 --pretty="%ct") - echo $LATEST_TAG_DATE - - echo "Latest merge:" - git log --merges --pretty="%ci - %h - %s %d" -n 1 - LATEST_MERGE_DATE=$(git log --merges -n 1 --pretty="%ct") - echo $LATEST_MERGE_DATE - - if [[ $LATEST_MERGE_DATE -gt $LATEST_TAG_DATE ]]; then - echo "Latest tag is older than latest merge. Nightly will be created." - echo "SHOULD_RUN=true" >> $GITHUB_OUTPUT - else - echo "Latest merge is not older than latest tag. No new release needed." - echo "SHOULD_RUN=false" >> $GITHUB_OUTPUT - fi - - build: - name: Create Release Asset - needs: [check_merged] - if: ${{ needs.check_merged.outputs.should_run == 'true' }} - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - lfs: "true" - fetch-depth: 0 - - - name: Auto Increment Semver Action - uses: MCKanpolat/auto-semver-action@5003b8d37f4b03d95f15303ea10242cbf7c13141 # 2 - id: versioning - with: - releaseType: Patch - incrementPerCommit: false - github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Next Release Number - id: WAU_version - run: | - echo "Next Release version: ${{ steps.versioning.outputs.version }}" - - - name: Overwrite Version.txt file - uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3 - with: - path: Sources/Winget-AutoUpdate/Version.txt - write-mode: overwrite - contents: ${{ steps.versioning.outputs.version }} - - - name: Commit & Push - uses: actions-js/push@5a7cbd780d82c0c937b5977586e641b2fd94acc5 # v1.5 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: main - force: true - message: "Changed version to ${{ steps.versioning.outputs.version }}" - - - name: Build project - run: | - echo "### Get MDT from Microsoft ###" - wget https://download.microsoft.com/download/3/3/9/339BE62D-B4B8-4956-B58D-73C4685FC492/MicrosoftDeploymentToolkit_x64.msi - - echo "### Extract MSI ###" - 7z x MicrosoftDeploymentToolkit_x64.msi - - echo "### Copy ServiceUI.exe to 'Sources/Winget-AutoUpdate' folder ###" - mv Modena_File206 Sources/Winget-AutoUpdate/ServiceUI.exe -v - - echo "### Go to Sources ###" - cd Sources - - echo "### Zip WAU ###" - zip -r ../WAU.zip Winget-AutoUpdate - zip ../WAU.zip Winget-AutoUpdate-Install.ps1 - - echo "### Zip WAU-Configurator ###" - zip -r ../WAU-Configurator.zip Winget-AutoUpdate - zip ../WAU-Configurator.zip "Winget-AutoUpdate-Install.ps1" - zip ../WAU-Configurator.zip "WAU Configurator.bat" - - echo "### Zip ADMX ###" - cd Policies - zip -r ../../WAU_ADMX.zip * - cd ../.. - - echo "### Create install counter file ###" - echo "Install counter file." > WAU_InstallCounter - - - name: Create release - uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0 - id: release - with: - tag: "v${{ steps.versioning.outputs.version }}" - prerelease: true - generateReleaseNotes: true - name: "v${{ steps.versioning.outputs.version }} [Nightly Build]" - artifacts: "WAU-Configurator.zip,WAU.zip,WAU_ADMX.zip,WAU_InstallCounter" - - - name: URL to release - run: echo "Release -> ${{ steps.release.outputs.html_url }}" diff --git a/.github/workflows/WAU-CreateNewVersion.yml b/.github/workflows/WAU-CreateNewVersion.yml deleted file mode 100644 index 5149529..0000000 --- a/.github/workflows/WAU-CreateNewVersion.yml +++ /dev/null @@ -1,94 +0,0 @@ ---- -name: WAU - Create New Version - -on: - workflow_dispatch: - inputs: - version: - type: choice - default: "Patch" - description: Select next release type - options: - - Patch - - Minor - - Major - required: true - pre-release: - type: boolean - description: Set as Pre-release version - -permissions: - contents: write - -jobs: - build: - name: Create Release Asset - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - lfs: "true" - - - name: Auto Increment Semver Action - uses: MCKanpolat/auto-semver-action@5003b8d37f4b03d95f15303ea10242cbf7c13141 # 2 - id: versioning - with: - releaseType: ${{ github.event.inputs.version }} - incrementPerCommit: false - github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Overwrite Version.txt file - uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3 - with: - path: Sources/Winget-AutoUpdate/Version.txt - write-mode: overwrite - contents: "${{ steps.versioning.outputs.version }}" - - - name: Commit & Push - uses: actions-js/push@5a7cbd780d82c0c937b5977586e641b2fd94acc5 # v1.5 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: main - force: true - message: "Changed version to ${{ steps.versioning.outputs.version }}" - - - name: Build project - run: | - echo "### Get MDT from Microsoft ###" - wget https://download.microsoft.com/download/3/3/9/339BE62D-B4B8-4956-B58D-73C4685FC492/MicrosoftDeploymentToolkit_x64.msi - - echo "### Extract MSI ###" - 7z x MicrosoftDeploymentToolkit_x64.msi - - echo "### Copy ServiceUI.exe to 'Sources/Winget-AutoUpdate' folder ###" - mv Modena_File206 Sources/Winget-AutoUpdate/ServiceUI.exe -v - - echo "### Go to Sources ###" - cd Sources - - echo "### Zip WAU ###" - zip -r ../WAU.zip Winget-AutoUpdate - zip ../WAU.zip Winget-AutoUpdate-Install.ps1 - - echo "### Zip WAU-Configurator ###" - zip -r ../WAU-Configurator.zip Winget-AutoUpdate - zip ../WAU-Configurator.zip "Winget-AutoUpdate-Install.ps1" - zip ../WAU-Configurator.zip "WAU Configurator.bat" - - echo "### Zip ADMX ###" - cd Policies - zip -r ../../WAU_ADMX.zip * - cd ../.. - - echo "### Create install counter file ###" - echo "Install counter file." > WAU_InstallCounter - - - name: Create release - uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0 - with: - tag: "v${{ steps.versioning.outputs.version }}" - prerelease: ${{ github.event.inputs.pre-release }} - generateReleaseNotes: true - name: "v${{ steps.versioning.outputs.version }}" - artifacts: "WAU-Configurator.zip,WAU.zip,WAU_ADMX.zip,WAU_InstallCounter" diff --git a/.github/workflows/WAU-ReleaseBuilder.yml b/.github/workflows/WAU-ReleaseBuilder.yml new file mode 100644 index 0000000..579c49f --- /dev/null +++ b/.github/workflows/WAU-ReleaseBuilder.yml @@ -0,0 +1,159 @@ +--- +name: WAU - Release builder + +on: + # To trigger nightly release (Auto) + schedule: + - cron: "0 0 * * *" + # To trigger stable release + workflow_dispatch: + inputs: + version: + type: choice + default: "Minor" + description: Select next release type + options: + - Patch + - Minor + - Major + required: true + pre-release: + type: boolean + description: Set as Pre-release version + +permissions: + contents: write + +jobs: + build: + name: Create Release + runs-on: windows-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + lfs: "true" + fetch-depth: 0 + + - name: Manually OR Scheduled. If Scheduled, check if release is necessary + run: | + if ("${{ github.event_name }}" -eq "schedule") { + echo "Latest tag:" + git log --tags --pretty="%ci - %h - %s %d" -n 1 + $LATEST_TAG_DATE = git log --tags -n 1 --pretty="%ct" + echo $LATEST_TAG_DATE + + echo "Latest merge:" + git log --merges --pretty="%ci - %h - %s %d" -n 1 + $LATEST_MERGE_DATE = git log --merges -n 1 --pretty="%ct" + echo $LATEST_MERGE_DATE + + if ( $LATEST_MERGE_DATE -gt $LATEST_TAG_DATE ) { + echo "Scheduled request. Latest tag is older than latest merge. Nightly prerelease will be created." + echo "ReleaseType=Prerelease" >> $env:GITHUB_ENV + } + else { + echo "Scheduled request. Latest tag is not older than latest merge. No new Nightly release needed." + echo "ReleaseType=No" >> $env:GITHUB_ENV + } + } + else { + echo "Manual request. Release will be created." + echo "ReleaseType=Release" >> $env:GITHUB_ENV + } + + - name: Auto Increment Semver Action + uses: MCKanpolat/auto-semver-action@5003b8d37f4b03d95f15303ea10242cbf7c13141 # 2 + if: env.ReleaseType != 'No' + id: versioning + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + incrementPerCommit: false + releaseType: Pre${{ github.event.inputs.version || 'patch'}} # Using Prepatch by default + + - name: Format Semver (and msi version) + if: env.ReleaseType != 'No' + # Remove "-0" for stable release and replace by "-n" for Nightlies + run: | + $NextAutoSemver = "${{ steps.versioning.outputs.version }}" + if ("${{ env.ReleaseType }}" -eq "Release") { + $MsiVersion = $NextAutoSemver.Split("-")[0] + $NextSemver = $NextAutoSemver.Split("-")[0] + $ReleaseName = "WAU " + $NextSemver + $Prerelease = 0 + } + else { + $MsiVersion = $NextAutoSemver.Split("-")[0] + $NextSemver = $NextAutoSemver.Replace("-0","-n") + $ReleaseName = "WAU " + $NextSemver + " [Nightly Build]" + $Prerelease = 1 + } + echo "MSI version: $MsiVersion" + echo "Semver created: $NextSemver" + echo "Prerelease: $Prerelease" + echo "Release name: $ReleaseName" + echo "MsiVersion=$MsiVersion" >> $env:GITHUB_ENV + echo "NextSemVer=$NextSemVer" >> $env:GITHUB_ENV + echo "Prerelease=$Prerelease" >> $env:GITHUB_ENV + echo "ReleaseName=$ReleaseName" >> $env:GITHUB_ENV + + - name: Build project + if: env.ReleaseType != 'No' + shell: powershell + run: | + echo "### Get MDT from Microsoft ###" + wget https://download.microsoft.com/download/3/3/9/339BE62D-B4B8-4956-B58D-73C4685FC492/MicrosoftDeploymentToolkit_x64.msi -UseBasicParsing -OutFile .\MicrosoftDeploymentToolkit_x64.msi + Start-Process .\MicrosoftDeploymentToolkit_x64.msi -ArgumentList "/quiet /norestart" -Wait + + echo "### Copy ServiceUI.exe x64 to 'Sources\Winget-AutoUpdate' folder ###" + Copy-Item -Path "C:\Program Files\Microsoft Deployment Toolkit\Templates\Distribution\Tools\x64\ServiceUI.exe" -Destination ".\Sources\Winget-AutoUpdate\ServiceUI.exe" -Force + Get-Item .\Sources\Winget-AutoUpdate\* + + echo "### Install WiX ###" + dotnet new console + dotnet tool install --global wix --version 5.0.1 + wix extension add WixToolset.UI.wixext/5.0.1 -g + wix extension add WixToolset.Util.wixext/5.0.1 -g + + echo "### Create WAU msi ###" + cd .\Sources\Wix\ + wix build -src build.wxs -ext WixToolset.Util.wixext -ext WixToolset.UI.wixext -out ..\..\WAU.msi -arch x64 -d Version=${{ env.MsiVersion }} -d NextSemVer=${{ env.NextSemVer }} -d Comment="${{ env.ReleaseName }}" -d PreRelease=${{ env.PreRelease }} + cd ..\.. + Get-Item .\WAU.msi + + echo "### Get MSI file SHA ###" + $MsiSHA = (Get-FileHash .\WAU.msi).hash + echo " - WAU.msi SHA256: $MsiSHA" + echo "MSI_SHA=$MsiSHA" >> $env:GITHUB_ENV + + echo "### Zip ADMX ###" + Compress-Archive -Path .\Sources\Policies\ADMX -DestinationPath .\WAU_ADMX.zip -Force + Get-Item .\*.zip + + echo "### Get ADMX zip SHA ###" + $ADMXSHA = (Get-FileHash .\WAU_ADMX.zip).hash + echo " - WAU_ADMX.zip SHA256: $ADMXSHA" + echo "ADMX_SHA=$ADMXSHA" >> $env:GITHUB_ENV + + echo "### Create install counter file ###" + echo "Install counter file." > WAU_InstallCounter + + echo "### Download the latest v1 WAU.zip (as v2 updater)" + wget https://github.com/Romanitho/Winget-AutoUpdate/releases/download/v1.21.8/WAU.zip -UseBasicParsing -OutFile .\WAU.zip + + - name: Create release + uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0 + if: env.ReleaseType != 'No' + with: + tag: v${{ env.NextSemVer }} + prerelease: ${{ github.event.inputs.pre-release || true }} + generateReleaseNotes: true + name: ${{ env.ReleaseName }} + artifacts: "WAU.msi,WAU_ADMX.zip,WAU.zip,WAU_InstallCounter" + body: | + |Files|Hash (SHA256)|Downloads| + |---|---|---| + |[WAU.msi](https://github.com/Romanitho/Winget-AutoUpdate/releases/download/v${{ env.NextSemVer }}/WAU.msi) (x64)|${{ env.MSI_SHA }}|![WAU.msi](https://img.shields.io/github/downloads/Romanitho/Winget-AutoUpdate/v${{ env.NextSemVer }}/WAU.msi?style=flat-square&label=&color=blue)| + |[WAU_ADMX.zip](https://github.com/Romanitho/Winget-AutoUpdate/releases/download/v${{ env.NextSemVer }}/WAU_ADMX.zip)|${{ env.ADMX_SHA }}|![WAU_ADMX.zip](https://img.shields.io/github/downloads/Romanitho/Winget-AutoUpdate/v${{ env.NextSemVer }}/WAU_ADMX.zip?style=flat-square&label=&color=blue)| + + ![Install counter](https://img.shields.io/github/downloads/Romanitho/Winget-AutoUpdate/v${{ env.NextSemVer }}/WAU_InstallCounter?style=flat-square&label=Total%20reported%20installations%20for%20this%20release&color=blue) diff --git a/.github/workflows/powershell-tests.yaml b/.github/workflows/powershell-tests.yaml index e30850d..f5b89de 100644 --- a/.github/workflows/powershell-tests.yaml +++ b/.github/workflows/powershell-tests.yaml @@ -26,7 +26,7 @@ jobs: - name: Perform a Pester test for WAU run shell: powershell run: | - $command = New-PesterContainer -Path C:\ProgramData\Winget-AutoUpdate\user-run.ps1 + $command = New-PesterContainer -Path "C:\Program Files\Winget-AutoUpdate\user-run.ps1" Invoke-Pester -PassThru -Container $command -ErrorAction Continue #- name: Read WAU Log # id: package diff --git a/README.md b/README.md index 2d62ece..0b84826 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,7 @@ ![image](https://github.com/Romanitho/Winget-AutoUpdate/assets/96626929/0e738c7a-cbe4-4010-94f6-1e9165bc0d49) -[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/Romanitho/Winget-AutoUpdate?label=Latest%20Stable%20Release&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/latest) -[![GitHub release (by tag)](https://img.shields.io/github/downloads/Romanitho/Winget-AutoUpdate/latest/WAU-Configurator.zip?label=Downloads&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/latest) -[![GitHub release (by tag)](https://img.shields.io/github/downloads/Romanitho/Winget-AutoUpdate/latest/WAU.zip?label=Downloads&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/latest) -[![GitHub release (by tag)](https://img.shields.io/github/downloads/Romanitho/Winget-AutoUpdate/latest/WAU_InstallCounter?label=Installations&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/latest) +[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/Romanitho/Winget-AutoUpdate?label=Latest%20Stable%20Release&style=for-the-badge)](https://github.com/Romanitho/Winget-AutoUpdate/releases/latest) @@ -16,29 +13,32 @@ This project uses the Winget tool to daily update apps (with system context) and ![image](https://user-images.githubusercontent.com/96626929/150645599-9460def4-0818-4fe9-819c-dd7081ff8447.png) ## Installation -Just [download latest release (WAU-Configurator.zip)](https://github.com/Romanitho/Winget-AutoUpdate/releases/latest/download/WAU-Configurator.zip), unzip, run "WAU Configurator": +Just download latest release [WAU.msi](https://github.com/Romanitho/Winget-AutoUpdate/releases/latest/download/WAU.msi): + +![1](https://github.com/user-attachments/assets/8a3a656d-f825-4cea-b971-5f775a6c7ba8) +![2](https://github.com/user-attachments/assets/46913e03-8604-43f5-8bca-129d1e714e45) + -![WAU Configurator Screenshot](https://github.com/Romanitho/Winget-AutoUpdate/assets/96626929/e3c3a331-1c49-40c5-8f70-e39cf9fc7fd1) ## Configurations ### Keep some apps out of Winget-AutoUpdate - #### BlockList You can exclude apps from update job (for instance, apps you want to keep at a specific version or apps with built-in auto-update): -Add (or remove) the apps' ID you want to disable autoupdate to 'excluded_apps.txt'. (File must be placed in WAU's installation folder, or re-run install.bat). -- #### Or AllowList -You can update only pre-selected apps. To do so, create an "included_apps.txt" with the apps' ID of the apps you want to auto-update and run the `Winget-AutoUpdate-Install.ps1` with `-UseWhiteList` parameter. Related post: +Add (or remove) the apps' ID you want to disable autoupdate to 'excluded_apps.txt'. (File must be placed in the same folder as WAU.msi). +- #### AllowList +You can update only pre-selected apps. To do so, create an "included_apps.txt" with the apps' ID of the apps you want to auto-update and place it in the same folder as WAU.msi during install. -> The lists can contain Wildcard (*). For instance ```Mozilla.Firefox*``` will take care of all Firefox channels. (From v1.20.0) +> The lists can contain Wildcard (*). For instance ```Mozilla.Firefox*``` will take care of all Firefox channels. ### Notification Level -You can choose which notification will be displayed: Full, Success only or none. Use `-NotificationLevel` parameter when you run `Winget-AutoUpdate-Install.ps1`. +You can choose which notification will be displayed: `Full`, `Success only` or `None`. ### Notification language You can easily translate toast notifications by creating your locale xml config file (and share it with us :) ). ### When does the script run? -WAU runs everyday at 6AM. You can now configure the frequency with `-UpdatesInterval` option (Daily, BiDaily, Weekly, BiWeekly, Monthly or Never). You can also add `-UpdatesAtLogon` parameter to run at user logon (recommended). +WAU runs ,by default, at logon. You can configure the frequency with options (Daily, BiDaily, Weekly, BiWeekly, Monthly or Never). ### Log location You can find logs in install location, in logs folder.
@@ -62,38 +62,32 @@ To force WAU to run on metered connections anyway, run new installation with `-R WAU runs with system and user contexts. This way, even apps installed on User's scope are updated. Shorcuts for manually run can also be installed. ### Default install location -By default, scripts and components will be placed in ProgramData location (inside a Winget-AutoUpdate folder). You can change this with script argument (Not Recommended). +By default, scripts and components will be placed in "Program Files" location (inside a Winget-AutoUpdate folder). ## Update WAU ### Manual Update Same process as new installation. ### Automatic Update -By default, WAU AutoUpdate is enabled. It will not overwrite the configurations, icons (if personalised), excluded_apps list,... -To disable WAU AutoUpdate, run the `Winget-AutoUpdate-Install.ps1` with `-DisableWAUAutoUpdate` parameter. - -## Uninstall WAU -Simply uninstall it from your programs: - -![image](https://user-images.githubusercontent.com/96626929/170879336-ef034956-4778-41f0-b8fd-d307b77b70a9.png) +By default, WAU AutoUpdate is enabled. It will not overwrite the configurations, excluded_apps list,... ## Advanced installation **Mainly for admins or advanced user installation.**
-You can run the `Winget-AutoUpdate-Install.ps1` script with parameters : +You can run the `WAU.msi` script with parameters : -**-Silent**
+**/qn**
Install Winget-AutoUpdate and prerequisites silently. -**-DoNotUpdate**
-Do not run Winget-AutoUpdate after installation. By default, Winget-AutoUpdate is run just after installation. +**RUN_WAU**
+Default value NO. Set `RUN_WAU=YES` to run WAU just after installation. -**-DisableWAUAutoUpdate**
-Disable Winget-AutoUpdate update checking. By default, WAU auto updates if new version is available on Github. +**DISABLEWAUAUTOUPDATE**
+Default value 0. Set `DISABLEWAUAUTOUPDATE=1` to disable Winget-AutoUpdate self update checking. By default, WAU auto updates if new version is available on Github. -**-UseWhiteList**
-Use White List instead of Black List. This setting will not create the "excluded_apps.txt" but "included_apps.txt". +**USEWHITELIST**
+Set `USEWHITELIST=1` to force WAU to use WhiteList. During installation, if a whitelist is provided, this setting is automatically set to 1. -**-ListPath**
+**LISTPATH**
Get Black/White List from external Path (**URL/UNC/Local/GPO**) - download/copy to Winget-AutoUpdate installation location if external list is newer.
**PATH** must end with a Directory, not a File...
...if the external Path is an **URL** and the web host doesn't respond with a date/time header for the file (i.e **GitHub**) then the file is always downloaded!
@@ -106,7 +100,7 @@ Instead you must escape **every** special character (notice the `%` escape too) If `-ListPath` is set to **GPO** the Black/White List can be managed from within the GPO itself under **Application GPO Blacklist**/**Application GPO Whitelist**. Thanks to [Weatherlights](https://github.com/Weatherlights) in [#256 (reply in thread)](https://github.com/Romanitho/Winget-AutoUpdate/discussions/256#discussioncomment-4710599)! -**-ModsPath**
+**MODSPATH**
Get Mods from external Path (**URL/UNC/Local/AzureBlob**) - download/copy to `mods` in Winget-AutoUpdate installation location if external mods are newer.
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): ``` @@ -125,58 +119,51 @@ Validated on **IIS/Apache**. For **AzureBlob**: This requires the parameter **-AzureBlobURL** to be set with an appropriate Azure Blob Storage URL including the SAS token. See **-AzureBlobURL** for more information. -**-AzureBlobURL**
+**AZUREBLOBURL**
Used in conjunction with the **-ModsPath** parameter to provide the Azure Storage Blob URL with SAS token. The SAS token must, at a minimum, have 'Read' and 'List' permissions. It is recommended to set the permisions at the container level and rotate the SAS token on a regular basis. Ensure the container reflects the same structure as found under the initial `mods` folder. -**-InstallUserContext**
-Install WAU with system and **user** context executions.
+**USERCONTEXT**
+Default value 0. Set `USERCONTEXT=1` to install WAU with system and **user** context executions.
Applications installed in system context will be ignored under user context. -**-BypassListForUsers**
-Bypass Black/White list when run in user context. +**BYPASSLISTFORUSERS**
+Default value 0. Set `BYPASSLISTFORUSERS=1` to bypass Black/White list when run in user context. -**-NoClean**
-Keep critical files when installing/uninstalling. This setting will keep "excluded_apps.txt", "included_apps.txt", "mods" and "logs" as they were. +**DESKTOPSHORTCUT**
+Set `DESKTOPSHORTCUT=1` to create a shortcut for user interaction on the Desktop to run task `Winget-AutoUpdate` -**-DesktopShortcut**
-Create a shortcut for user interaction on the Desktop to run task `Winget-AutoUpdate` +**STARTMENUSHORTCUT**
+Set `STARTMENUSHORTCUT=1` to create shortcuts for user interaction in the Start Menu to run task `Winget-AutoUpdate` and open Logs. -**-StartMenuShortcut**
-Create shortcuts for user interaction in the Start Menu to run task `Winget-AutoUpdate`, open Logs and Web Help. - -**-NotificationLevel**
+**NOTIFICATIONLEVEL**
Specify the Notification level: Full (Default, displays all notification), SuccessOnly (Only displays notification for success) or None (Does not show any popup). -**-UpdatesAtLogon**
-Set WAU to run at user logon. +**UPDATESATLOGON**
+Default value 0. Set `UPDATESATLOGON=1` to configure WAU to run at user logon. -**-UpdatesInterval**
-Specify the update frequency: Daily (Default), BiDaily, Weekly, BiWeekly, Monthly or Never. Can be set to 'Never' in combination with '-UpdatesAtLogon' for instance. +**UPDATESINTERVAL**
+Default value Never. Specify the update frequency: Daily, BiDaily, Weekly, BiWeekly, Monthly or Never. -**-UpdatesAtTime**
-Specify the time of the update interval execution time. Default 6AM. +**UPDATESATTIME**
+Default value 6AM. Specify the time of the update interval execution time. -**-RunOnMetered**
-Force WAU to run on metered connections. May add cellular data costs on shared connexion from smartphone for example. +**DONOTRUNONMETERED**
+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. -**-MaxLogFiles**
+**MAXLOGFILES**
Specify number of allowed log files.
Default is 3 out of 0-99:
Setting MaxLogFiles to 0 don't delete any old archived log files.
Setting it to 1 keeps the original one and just let it grow. -**-MaxLogSize**
+**MAXLOGSIZE**
Specify the size of the log file in bytes before rotating.
Default is 1048576 = 1 MB (ca. 7500 lines) -**-WAUinstallPath**
-Specify Winget-AutoUpdate installation location. Default: `C:\ProgramData\Winget-AutoUpdate` (Recommended to leave default). +**INSTALLDIR**
+Specify Winget-AutoUpdate installation location. Default: `C:\Program Files\Winget-AutoUpdate` (Recommended to leave default). -**-Uninstall**
-Remove scheduled tasks and scripts. -## Intune/SCCM use -See ## 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.
@@ -233,8 +220,5 @@ Feel free to give us any suggestions or optimizations in code and support us by #### WAU - GitHub [![GitHub release (release name instead of tag name)](https://img.shields.io/github/v/release/Romanitho/Winget-AutoUpdate?display_name=release&include_prereleases&label=Latest%20Release&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/) -[![GitHub release (latest by SemVer including pre-releases)](https://img.shields.io/github/downloads-pre/Romanitho/Winget-AutoUpdate/latest/WAU-Configurator.zip?label=Downloads&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/) -[![GitHub release (latest by SemVer including pre-releases)](https://img.shields.io/github/downloads-pre/Romanitho/Winget-AutoUpdate/latest/WAU.zip?label=Downloads&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/) -[![GitHub release (latest by SemVer including pre-releases)](https://img.shields.io/github/downloads-pre/Romanitho/Winget-AutoUpdate/latest/WAU_InstallCounter?label=Installations&style=flat-square)](https://github.com/Romanitho/Winget-AutoUpdate/releases/) diff --git a/Sources/WAU Configurator.bat b/Sources/WAU Configurator.bat deleted file mode 100644 index bab4574..0000000 --- a/Sources/WAU Configurator.bat +++ /dev/null @@ -1,811 +0,0 @@ -@@:: This prolog allows a PowerShell script to be embedded in a .CMD file. -@@:: Any non-PowerShell content must be preceeded by "@@" -@@setlocal -@@set POWERSHELL_BAT_ARGS=%* -@@if defined POWERSHELL_BAT_ARGS set POWERSHELL_BAT_ARGS=%POWERSHELL_BAT_ARGS:"=\"% -@@PowerShell -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command Invoke-Expression $('$args=@(^&{$args} %POWERSHELL_BAT_ARGS%);'+[String]::Join([char]10,$((Get-Content '%~f0') -notmatch '^^@@'))) & goto :EOF - -<# -.SYNOPSIS -Install and configure Winget-AutoUpdate - -.DESCRIPTION -This script will: - - Install Winget if not present - - Install Winget-AutoUpdate to get apps daily updated - - Install apps with Winget from a custom list file (apps.txt) or directly from popped up default list. -#> - -<# UNBLOCK FILES #> - -Get-ChildItem -R | Unblock-File - - -<# APP INFO #> - -# import Appx module if the powershell version is 7/core -if ( $psversionTable.PSEdition -eq "core" ) { - import-Module -name Appx -UseWIndowsPowershell -WarningAction:SilentlyContinue -} - -$Script:WorkingDir = (Get-Location).Path -$Script:WAUConfiguratorVersion = Get-Content "$WorkingDir\Winget-AutoUpdate\Version.txt" - - -<# FUNCTIONS #> - -. "$WorkingDir\Winget-AutoUpdate\functions\Update-WinGet.ps1" -. "$WorkingDir\Winget-AutoUpdate\functions\Get-WingetCmd.ps1" - -#Function to start or update popup -Function Start-PopUp ($Message) { - - if (!$PopUpWindow) { - - #Create window - $inputXML = @" - - - - - -"@ - - [xml]$XAML = ($inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^ - - - -