From 2cb2d5d3ae7b98172f53495ff3da63c33f7c2fe1 Mon Sep 17 00:00:00 2001 From: Romanitho <96626929+Romanitho@users.noreply.github.com> Date: Tue, 18 Jan 2022 09:49:24 +0100 Subject: [PATCH] Add files via upload --- install.bat | 2 +- sample-excluded_apps.txt | 5 +++++ winget-install-and-update.ps1 | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 sample-excluded_apps.txt diff --git a/install.bat b/install.bat index 67c55bf..50a26b6 100644 --- a/install.bat +++ b/install.bat @@ -1 +1 @@ -powershell.exe -executionpolicy bypass -file "%~dp0winget-install-and-update.ps1" +powershell.exe -executionpolicy bypass -file "%~dp0winget-install-and-update.ps1" \ No newline at end of file diff --git a/sample-excluded_apps.txt b/sample-excluded_apps.txt new file mode 100644 index 0000000..5db67b1 --- /dev/null +++ b/sample-excluded_apps.txt @@ -0,0 +1,5 @@ +Google.Chrome +Mozilla.Firefox +Mozilla.Firefox.ESR +Microsoft.Edge +Microsoft.Office \ No newline at end of file diff --git a/winget-install-and-update.ps1 b/winget-install-and-update.ps1 index b3170ab..381ea1e 100644 --- a/winget-install-and-update.ps1 +++ b/winget-install-and-update.ps1 @@ -3,7 +3,8 @@ $WingetUpdatePath = "$env:ProgramData\winget-update" if (!(Test-Path $WingetUpdatePath)){ New-Item -ItemType Directory -Force -Path $WingetUpdatePath } -Copy-Item -Path "$PSScriptRoot\winget-update\*" -Destination $WingetUpdatePath -Recurse -Force +Copy-Item -Path "$PSScriptRoot\winget-update\*" -Destination $WingetUpdatePath -Recurse -Force -ErrorAction SilentlyContinue +Copy-Item -Path "$PSScriptRoot\excluded_apps.txt" -Destination $WingetUpdatePath -Recurse -Force -ErrorAction SilentlyContinue # Set dummy regkeys for notification name and icon & reg add "HKCR\AppUserModelId\Windows.SystemToast.Winget.Notification" /v DisplayName /t REG_EXPAND_SZ /d "Application Update" /f @@ -30,4 +31,4 @@ $task = New-ScheduledTask -Action $taskAction -Principal $taskUserPrincipal -Set Register-ScheduledTask -TaskName 'Winget Update Notify' -InputObject $task -Force # Run Winget -Get-ScheduledTask -TaskName "Winget Update" -ErrorAction SilentlyContinue | Start-ScheduledTask -ErrorAction SilentlyContinue +Get-ScheduledTask -TaskName "Winget Update" -ErrorAction SilentlyContinue | Start-ScheduledTask -ErrorAction SilentlyContinue \ No newline at end of file