Better fix
parent
c67eee3677
commit
4563b7b5f6
|
@ -256,13 +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
|
||||||
|
if ($WAUInstallLocation) {
|
||||||
$WhiteList = "$WAUInstallLocation\included_apps.txt"
|
$WhiteList = "$WAUInstallLocation\included_apps.txt"
|
||||||
#Create included_apps.txt if it doesn't exist
|
#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
|
New-Item -ItemType File -Path $WhiteList -Force -ErrorAction SilentlyContinue
|
||||||
}
|
}
|
||||||
if (Test-Path $WhiteList) {
|
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue