Wrong place

pull/386/head
KnifMelti 2023-09-02 19:13:10 +02:00
parent 823c5497bf
commit 6530b2d449
1 changed files with 13 additions and 12 deletions

View File

@ -177,20 +177,21 @@ if (Test-Network) {
Write-ToLog "$DeletedMods Mods deleted (not externally managed) from local path: $($WAUConfig.InstallLocation.TrimEnd(" ", "\"))\mods" "Red" Write-ToLog "$DeletedMods Mods deleted (not externally managed) from local path: $($WAUConfig.InstallLocation.TrimEnd(" ", "\"))\mods" "Red"
} }
} }
}
#Test if _WAU-mods.ps1 exist (Mods for WAU if Network is active/any Winget is installed/running as SYSTEM) #Test if _WAU-mods.ps1 exist (Mods for WAU if Network is active/any Winget is installed/running as SYSTEM)
$Mods = "$WorkingDir\mods" $Mods = "$WorkingDir\mods"
if (Test-Path "$Mods\_WAU-mods.ps1") { if (Test-Path "$Mods\_WAU-mods.ps1") {
Write-ToLog "Running Mods for WAU..." "Yellow" Write-ToLog "Running Mods for WAU..." "Yellow"
& "$Mods\_WAU-mods.ps1" & "$Mods\_WAU-mods.ps1"
$ModsExitCode = $LASTEXITCODE $ModsExitCode = $LASTEXITCODE
#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 -ExecutionPolicy Bypass -Command `"$WorkingDir\winget-upgrade.ps1`""
Exit Exit
}
} }
} }
if ($($WAUConfig.WAU_ListPath) -eq "GPO") { if ($($WAUConfig.WAU_ListPath) -eq "GPO") {