A few small fixes
parent
b089980ae7
commit
3e04b1d544
|
@ -277,9 +277,6 @@ function Install-WingetAutoUpdate {
|
|||
New-ItemProperty $regPath -Name DisplayIcon -Value "C:\Windows\System32\shell32.dll,-16739" -Force | Out-Null
|
||||
New-ItemProperty $regPath -Name DisplayVersion -Value $WAUVersion -Force | Out-Null
|
||||
New-ItemProperty $regPath -Name InstallLocation -Value $WingetUpdatePath -Force | Out-Null
|
||||
if ($ListPath){
|
||||
New-ItemProperty $regPath -Name ListPath -Value $ListPath -Force | Out-Null
|
||||
}
|
||||
New-ItemProperty $regPath -Name UninstallString -Value "powershell.exe -noprofile -executionpolicy bypass -file `"$WingetUpdatePath\WAU-Uninstall.ps1`"" -Force | Out-Null
|
||||
New-ItemProperty $regPath -Name QuietUninstallString -Value "powershell.exe -noprofile -executionpolicy bypass -file `"$WingetUpdatePath\WAU-Uninstall.ps1`"" -Force | Out-Null
|
||||
New-ItemProperty $regPath -Name NoModify -Value 1 -Force | Out-Null
|
||||
|
@ -300,6 +297,9 @@ function Install-WingetAutoUpdate {
|
|||
if (!$RunOnMetered) {
|
||||
New-ItemProperty $regPath -Name WAU_DoNotRunOnMetered -Value 1 -PropertyType DWord -Force | Out-Null
|
||||
}
|
||||
if ($ListPath){
|
||||
New-ItemProperty $regPath -Name ListPath -Value $ListPath -Force | Out-Null
|
||||
}
|
||||
|
||||
Write-host "WAU Installation succeeded!" -ForegroundColor Green
|
||||
Start-sleep 1
|
||||
|
|
|
@ -4,8 +4,8 @@ function Get-ExcludedApps {
|
|||
|
||||
if (Test-Path "$WorkingDir\excluded_apps.txt") {
|
||||
|
||||
return Get-Content -Path "$WorkingDir\excluded_apps.txt"
|
||||
return (Get-Content -Path "$WorkingDir\excluded_apps.txt").Trim() | Where-Object{$_.length -gt 0}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@ function Get-IncludedApps {
|
|||
|
||||
if (Test-Path "$WorkingDir\included_apps.txt") {
|
||||
|
||||
return Get-Content -Path "$WorkingDir\included_apps.txt"
|
||||
return (Get-Content -Path "$WorkingDir\included_apps.txt").Trim() | Where-Object{$_.length -gt 0}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ function Invoke-PostUpdateActions {
|
|||
Write-Log "Running Post Update actions..." "yellow"
|
||||
|
||||
#Reset Winget Sources
|
||||
$ResolveWingetPath = Resolve-Path "$env:programfiles\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\winget.exe"
|
||||
$ResolveWingetPath = Resolve-Path "$env:programfiles\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\winget.exe" | Sort-Object { [version]($_.Path -replace '^[^\d]+_((\d+\.)*\d+)_.*', '$1') }
|
||||
if ($ResolveWingetPath) {
|
||||
#If multiple version, pick last one
|
||||
$WingetPath = $ResolveWingetPath[-1].Path
|
||||
|
|
|
@ -60,11 +60,14 @@ if (Test-Network) {
|
|||
|
||||
#Get External ListPath
|
||||
if ($WAUConfig.ListPath) {
|
||||
Write-Log "WAU uses External Lists"
|
||||
Write-Log "WAU uses External Lists from $WAUConfig.ListPath"
|
||||
$NewList = Test-ListPath $WAUConfig.ListPath $WAUConfig.WAU_UseWhiteList $WAUConfig.InstallLocation
|
||||
if ($NewList) {
|
||||
Write-Log "Newer List downloaded to local path"
|
||||
}
|
||||
else {
|
||||
Write-Log "No newer List detected"
|
||||
}
|
||||
}
|
||||
|
||||
#Get White or Black list
|
||||
|
|
Loading…
Reference in New Issue