Add files via upload

pull/2/head
Romanitho 2022-01-18 09:49:24 +01:00 committed by GitHub
parent c379a36353
commit 2cb2d5d3ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -1 +1 @@
powershell.exe -executionpolicy bypass -file "%~dp0winget-install-and-update.ps1" powershell.exe -executionpolicy bypass -file "%~dp0winget-install-and-update.ps1"

5
sample-excluded_apps.txt Normal file
View File

@ -0,0 +1,5 @@
Google.Chrome
Mozilla.Firefox
Mozilla.Firefox.ESR
Microsoft.Edge
Microsoft.Office

View File

@ -3,7 +3,8 @@ $WingetUpdatePath = "$env:ProgramData\winget-update"
if (!(Test-Path $WingetUpdatePath)){ if (!(Test-Path $WingetUpdatePath)){
New-Item -ItemType Directory -Force -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 # 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 & 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 Register-ScheduledTask -TaskName 'Winget Update Notify' -InputObject $task -Force
# Run Winget # Run Winget
Get-ScheduledTask -TaskName "Winget Update" -ErrorAction SilentlyContinue | Start-ScheduledTask -ErrorAction SilentlyContinue Get-ScheduledTask -TaskName "Winget Update" -ErrorAction SilentlyContinue | Start-ScheduledTask -ErrorAction SilentlyContinue