update log file location
This commit is contained in:
@@ -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}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user