log file locaton update
This commit is contained in:
@@ -5,11 +5,8 @@ param(
|
|||||||
[string]$AGENT_FILENAME='EmberkomAgentSetup.exe'
|
[string]$AGENT_FILENAME='EmberkomAgentSetup.exe'
|
||||||
)
|
)
|
||||||
|
|
||||||
## Get a temporary path
|
|
||||||
$TEMP = [System.IO.Path]::GetTempPath()
|
|
||||||
|
|
||||||
## Setup log file and function to write to it
|
## 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 }
|
If (! (Test-Path $LOGFILE) ) { New-Item -Path $LOGFILE -ItemType File }
|
||||||
Function Write-Log([string]$message)
|
Function Write-Log([string]$message)
|
||||||
{
|
{
|
||||||
@@ -28,6 +25,7 @@ Write-Log "CUSTOMER_ID: ${CUSTOMER_ID}"
|
|||||||
Write-Log "SOFTWARE_ID: ${SOFTWARE_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}"
|
$AGENT_INSTALLER = "${TEMP}\${AGENT_FILENAME}"
|
||||||
Write-Log "Agent installer will be saved to: ${AGENT_INSTALLER}"
|
Write-Log "Agent installer will be saved to: ${AGENT_INSTALLER}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user