commit
d9f870b45c
|
@ -256,9 +256,13 @@ function Uninstall-App ($AppID, $AppArgs) {
|
||||||
|
|
||||||
#Function to Add app to WAU white list
|
#Function to Add app to WAU white list
|
||||||
function Add-WAUWhiteList ($AppID) {
|
function Add-WAUWhiteList ($AppID) {
|
||||||
#Check if WAU default intall path exists
|
#Check if WAU default intall path is defined
|
||||||
$WhiteList = "$WAUInstallLocation\included_apps.txt"
|
if ($WAUInstallLocation) {
|
||||||
if (Test-Path $WhiteList) {
|
$WhiteList = "$WAUInstallLocation\included_apps.txt"
|
||||||
|
#Create included_apps.txt if it doesn't exist
|
||||||
|
if (!(Test-Path $WhiteList)) {
|
||||||
|
New-Item -ItemType File -Path $WhiteList -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
Write-ToLog "-> Add $AppID to WAU included_apps.txt"
|
Write-ToLog "-> Add $AppID to WAU included_apps.txt"
|
||||||
#Add App to "included_apps.txt"
|
#Add App to "included_apps.txt"
|
||||||
Add-Content -path $WhiteList -Value "`n$AppID" -Force
|
Add-Content -path $WhiteList -Value "`n$AppID" -Force
|
||||||
|
|
|
@ -214,7 +214,7 @@ if (Test-Network) {
|
||||||
#If _WAU-mods.ps1 has ExitCode 1 - Re-run WAU
|
#If _WAU-mods.ps1 has ExitCode 1 - Re-run WAU
|
||||||
if ($ModsExitCode -eq 1) {
|
if ($ModsExitCode -eq 1) {
|
||||||
Write-ToLog "Re-run WAU"
|
Write-ToLog "Re-run WAU"
|
||||||
Start-Process powershell -ArgumentList "-NoProfile -ExecutionPolicy Bypass -Command `"$WorkingDir\winget-upgrade.ps1`""
|
Start-Process powershell -ArgumentList "-NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command `"$WorkingDir\winget-upgrade.ps1`""
|
||||||
Exit
|
Exit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,28 @@ function Install-Prerequisites {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#Check if Microsoft.UI.Xaml.2.8 is installed
|
||||||
|
if (!(Get-AppxPackage -Name 'Microsoft.UI.Xaml.2.8' -AllUsers)) {
|
||||||
|
try {
|
||||||
|
Write-ToLog "Microsoft.UI.Xaml.2.8 is not installed" "Red"
|
||||||
|
#Download
|
||||||
|
$UIXamlUrl = "https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx"
|
||||||
|
$UIXamlFile = "$env:TEMP\Microsoft.UI.Xaml.2.8.x64.appx"
|
||||||
|
Write-ToLog "-> Downloading Microsoft.UI.Xaml.2.8..."
|
||||||
|
Invoke-RestMethod -Uri $UIXamlUrl -OutFile $UIXamlFile
|
||||||
|
#Install
|
||||||
|
Write-ToLog "-> Installing Microsoft.UI.Xaml.2.8..."
|
||||||
|
Add-AppxProvisionedPackage -Online -PackagePath $UIXamlFile -SkipLicense | Out-Null
|
||||||
|
Write-ToLog "-> Microsoft.UI.Xaml.2.8 installed successfully." "Green"
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-ToLog "-> Failed to intall Microsoft.UI.Xaml.2.8..." "Red"
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
Remove-Item -Path $UIXamlFile -Force
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Write-ToLog "Prerequisites checked. OK`n" "Green"
|
Write-ToLog "Prerequisites checked. OK`n" "Green"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@ Function Update-WinGet {
|
||||||
$WinGetAvailableVersion = ((Invoke-WebRequest $WinGeturl -UseBasicParsing | ConvertFrom-Json)[0].tag_name).Replace("v", "")
|
$WinGetAvailableVersion = ((Invoke-WebRequest $WinGeturl -UseBasicParsing | ConvertFrom-Json)[0].tag_name).Replace("v", "")
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
#if fail set version to the latest version as of 2023-10-08
|
#if fail set version to the latest version as of 2024-04-29
|
||||||
$WinGetAvailableVersion = "1.6.2771"
|
$WinGetAvailableVersion = "1.7.11132"
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue