Better fix

pull/619/head
KnifMelti 2024-04-26 03:56:21 +02:00
parent c67eee3677
commit 4563b7b5f6
1 changed files with 7 additions and 7 deletions

View File

@ -256,13 +256,13 @@ function Uninstall-App ($AppID, $AppArgs) {
#Function to Add app to WAU white list
function Add-WAUWhiteList ($AppID) {
#Check if WAU default intall path exists
#Check if WAU default intall path is defined
if ($WAUInstallLocation) {
$WhiteList = "$WAUInstallLocation\included_apps.txt"
#Create included_apps.txt if it doesn't exist
if ((Test-Path $WAUInstallLocation) -and !(Test-Path $WhiteList)) {
if (!(Test-Path $WhiteList)) {
New-Item -ItemType File -Path $WhiteList -Force -ErrorAction SilentlyContinue
}
if (Test-Path $WhiteList) {
Write-ToLog "-> Add $AppID to WAU included_apps.txt"
#Add App to "included_apps.txt"
Add-Content -path $WhiteList -Value "`n$AppID" -Force