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
|
||||||
$WhiteList = "$WAUInstallLocation\included_apps.txt"
|
if ($WAUInstallLocation) {
|
||||||
#Create included_apps.txt if it doesn't exist
|
$WhiteList = "$WAUInstallLocation\included_apps.txt"
|
||||||
if ((Test-Path $WAUInstallLocation) -and !(Test-Path $WhiteList)) {
|
#Create included_apps.txt if it doesn't exist
|
||||||
New-Item -ItemType File -Path $WhiteList -Force -ErrorAction SilentlyContinue
|
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"
|
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