From 77ef15494163f517a60587824224c71415f39007 Mon Sep 17 00:00:00 2001 From: JonasKloseBW Date: Mon, 13 Jan 2025 12:51:32 +0100 Subject: [PATCH] Add $AppListPath parameter - Add $AppListPath parameter - Set default value to "$AppsPath\AppList.json" - Modify Get-Apps call to use the $AppListPath parameter --- FFUDevelopment/BuildFFUVM.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/FFUDevelopment/BuildFFUVM.ps1 b/FFUDevelopment/BuildFFUVM.ps1 index d788a05..352d315 100644 --- a/FFUDevelopment/BuildFFUVM.ps1 +++ b/FFUDevelopment/BuildFFUVM.ps1 @@ -230,6 +230,7 @@ param( [string]$FFUDevelopmentPath = $PSScriptRoot, [bool]$InstallApps, + [string]$AppListPath, [hashtable]$AppsScriptVariables, [bool]$InstallOffice, @@ -471,6 +472,7 @@ if ($installationType -eq 'Server'){ 2025 { $WindowsVersion = '24H2' } } } +if (-not $AppListPath) { $AppListPath = "$AppsPath\AppList.json" } #FUNCTIONS function WriteLog($LogText) { @@ -4307,9 +4309,9 @@ if ($InstallApps) { exit } WriteLog "$AppsPath\InstallAppsandSysprep.cmd found" - If (Test-Path -Path "$AppsPath\AppList.json"){ - WriteLog "$AppsPath\AppList.json found, checking for winget apps to install" - Get-Apps -AppList "$AppsPath\AppList.json" + If (Test-Path -Path $AppListPath){ + WriteLog "$AppListPath found, checking for winget apps to install" + Get-Apps -AppList "$AppListPath" } if (-not $InstallOffice) {