Create logs under a folder matching the name of the application being installed

I had this same issue with Show-InstallationPrompt creating a 2nd log file. When the -nowait parameter is used, the AppDeployToolkitMain.ps1 script is called ‘asynchronously.’ Because my config XML file had this line: “<Toolkit_LogPath>$envWinDir\options\logs$AppVendor $AppName $AppVersion</Toolkit_LogPath>” using variables with values set in Deploy-Application.PS1, AppDeployToolkitMain.ps1 did not evaluate the following line to include the variables. “[String]$configToolkitLogDir = $ExecutionContext.InvokeCommand.ExpandString($xmlToolkitOptions.Toolkit_LogPath)” This made a 2nd log file.

My solution was to add the following line in the AsyncToolkitLaunch section in the body of AppDeployToolkitMain.ps.
$configToolkitLogDir = ($configToolkitLogDir.trim() + $ReferredInstallTitle)

Afterwards, the log directory, and therefore the log, remained the same when Show-InstallatPrompt ran asynchronously.