This project is read-only.

forcing *all* logs writes to custom log path failing

Topics: Archive - General
Jun 21, 2014 at 5:08 AM
Edited Jun 23, 2014 at 9:27 PM
I edited the AppDeployToolkitConfig.xml changing the default log file directory entries from


To the following in an effort to isolate installations into a sub-directory using a variable defined in the Deploy-Application.ps1


The Deploy-Application.ps1 writes both install and uninstall logs to the $pkgId; however, the AppDeployToolkitMain.ps1 simply refuses to conform it consistently writes PS_AppDeployToolkitMain_3.1.4_EN_01_PSAppDeployToolkit_.log to $envWinDir\Logs\Software directory despite my best efforts.

The log file consists of the following

[20-06-2014 23:01:11] [Asynchronous] App Deploy Toolkit Main called with switch ShowInstallationPrompt
[20-06-2014 23:01:11] [Asynchronous] Displaying custom installation prompt with the non-default parameters: [(Message=The uninstallation of Wireshark 1.10.8 complete.) (ButtonRightText=Ok) (Icon=Information)]...

I understand why the log file was generated, but I don't understand why I am unable to force it to write to $envWinDir\Logs\Software\$pkgId. Any words of wisdom would be greatly appreciated.

Best Regards,

Jun 25, 2014 at 9:16 PM
Hi Yves,

Sounds like the asynchronous script is looking at a cached copy of the XML file. Try deleting this path and running the script again:


To fix the _.log name, you can wait until the next release or use this code:

Variables: Log Files

$logTempFolder = Join-Path $envTemp $installName
If ($deploymentType -eq $Null) {$deploymentType = "Install" }
If ($configToolkitCompressLogs) {
$logFile = Join-Path $logTempFolder ("$installName" + "_$appDeployToolkitName" + "_$deploymentType.log")
$zipFileDate = (Get-Date).ToString("yyyy-MM-dd-hh-mm-ss")
$zipFileName = Join-Path $configToolkitLogDir ("$installName" + "_$deploymentType" + "_$")
If (Test-Path -Path $logTempFolder -ErrorAction SilentlyContinue ) { Remove-Item $logTempFolder -Recurse -Force -ErrorAction SilentlyContinue | Out-Null }
If (!(Test-Path -Path $logTempFolder -ErrorAction SilentlyContinue )) { New-Item $logTempFolder -Type Directory -ErrorAction SilentlyContinue | Out-Null }
Else {
$logFile = Join-Path $configToolkitLogDir ("$installName" + "_$appDeployToolkitName" + "_$deploymentType.log")
Jun 25, 2014 at 9:31 PM
Edited Jun 25, 2014 at 9:31 PM

This is perfect! many thanks for responding.

Best regards,