log file locaton update

This commit is contained in:
2020-06-22 11:49:35 -04:00
parent ee28e6f132
commit dfa807d1f1
+3 -5
View File
@@ -5,11 +5,8 @@ param(
[string]$AGENT_FILENAME='EmberkomAgentSetup.exe'
)
## Get a temporary path
$TEMP = [System.IO.Path]::GetTempPath()
## Setup log file and function to write to it
$LOGFILE = "{0}EmberkomAgentSetup_{1}.log" -f $TEMP, $(Get-Date -Format "yyyyMMddHHmmss")
$LOGFILE = "{0}EmberkomAgentSetup_{1}.log" -f "${Env:WINDIR}\Temp", $(Get-Date -Format "yyyyMMddHHmmss")
If (! (Test-Path $LOGFILE) ) { New-Item -Path $LOGFILE -ItemType File }
Function Write-Log([string]$message)
{
@@ -27,7 +24,8 @@ Catch { Write-Log "This script tried to delete itself but failed!" }
Write-Log "CUSTOMER_ID: ${CUSTOMER_ID}"
Write-Log "SOFTWARE_ID: ${SOFTWARE_ID}"
## Build the path for $AGENT_INSTALLER
## 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}"