2026-02-15 23:08:54 +01:00
|
|
|
# Saves the provided appsList to the CustomAppsList file
|
|
|
|
|
function SaveCustomAppsListToFile {
|
|
|
|
|
param (
|
|
|
|
|
$appsList
|
|
|
|
|
)
|
|
|
|
|
|
2026-06-22 02:30:31 +07:00
|
|
|
if ($script:Params.ContainsKey("WhatIf")) {
|
|
|
|
|
Write-Host "[WhatIf] Save custom apps list to file" -ForegroundColor Cyan
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-15 23:08:54 +01:00
|
|
|
$script:SelectedApps = $appsList
|
|
|
|
|
|
|
|
|
|
# Create file that stores selected apps if it doesn't exist
|
|
|
|
|
if (-not (Test-Path $script:CustomAppsListFilePath)) {
|
|
|
|
|
$null = New-Item $script:CustomAppsListFilePath -ItemType File
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Set-Content -Path $script:CustomAppsListFilePath -Value $script:SelectedApps
|
|
|
|
|
}
|