update log file location

This commit is contained in:
2020-06-22 12:32:01 -04:00
parent dfa807d1f1
commit db6da60694
+4 -2
View File
@@ -5,8 +5,11 @@ param(
[string]$AGENT_FILENAME='EmberkomAgentSetup.exe'
)
## Get temporary path
$TEMP = [System.IO.Path]::GetTempPath()
## Setup log file and function to write to it
$LOGFILE = "{0}EmberkomAgentSetup_{1}.log" -f "${Env:WINDIR}\Temp", $(Get-Date -Format "yyyyMMddHHmmss")
$LOGFILE = "{0}EmberkomAgentSetup_{1}.log" -f $TEMP, $(Get-Date -Format "yyyyMMddHHmmss")
If (! (Test-Path $LOGFILE) ) { New-Item -Path $LOGFILE -ItemType File }
Function Write-Log([string]$message)
{
@@ -25,7 +28,6 @@ Write-Log "CUSTOMER_ID: ${CUSTOMER_ID}"
Write-Log "SOFTWARE_ID: ${SOFTWARE_ID}"
## Build the path for $AGENT_INSTALLER
$TEMP = [System.IO.Path]::GetTempPath()
$AGENT_INSTALLER = "${TEMP}\${AGENT_FILENAME}"
Write-Log "Agent installer will be saved to: ${AGENT_INSTALLER}"