cleanup from testing
This commit is contained in:
@@ -16,7 +16,6 @@ Try { New-Item -Path $TEMPDIR -ItemType Directory -Force -ErrorAction Stop }
|
|||||||
Catch { LogErr $_.Exception.Message ; Exit }
|
Catch { LogErr $_.Exception.Message ; Exit }
|
||||||
|
|
||||||
# Write $CONFIG to install_config.ini
|
# Write $CONFIG to install_config.ini
|
||||||
#Try { $CONFIG | Out-File -FilePath "${TEMPDIR}\install_config.ini" -Force -ErrorAction Stop }
|
|
||||||
Try { $CONFIG | WriteToFile_UTF8NoBOM -FilePath "${TEMPDIR}\install_config.ini" }
|
Try { $CONFIG | WriteToFile_UTF8NoBOM -FilePath "${TEMPDIR}\install_config.ini" }
|
||||||
Catch { LogMsg "Cannot write configuration file! This script will exit." ; LogErr $_.Exception.Message ; Exit }
|
Catch { LogMsg "Cannot write configuration file! This script will exit." ; LogErr $_.Exception.Message ; Exit }
|
||||||
|
|
||||||
@@ -26,7 +25,6 @@ If ( Is64bit ) { $AGENTNAME = "agent_x64.msi" } Else { $AGENTNAME = "agent_x86.m
|
|||||||
# Download the installer
|
# Download the installer
|
||||||
$INSTALLER = "${TEMPDIR}\${AGENTNAME}"
|
$INSTALLER = "${TEMPDIR}\${AGENTNAME}"
|
||||||
$URL = 'https://download.eset.com/com/eset/apps/business/era/agent/latest/{0}' -f $AGENTNAME
|
$URL = 'https://download.eset.com/com/eset/apps/business/era/agent/latest/{0}' -f $AGENTNAME
|
||||||
#$URL = 'https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/resources/eset_protect_{0}' -f $AGENTNAME
|
|
||||||
LogMsg "Downloading ESET Management Agent"
|
LogMsg "Downloading ESET Management Agent"
|
||||||
Download-File -URL $URL -File $INSTALLER
|
Download-File -URL $URL -File $INSTALLER
|
||||||
|
|
||||||
@@ -36,6 +34,6 @@ Try { Start-Process "msiexec.exe" -ArgumentList "/i ${INSTALLER} /qn /norestart
|
|||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
|
||||||
# Delete the installer
|
# Delete the installer
|
||||||
#LogMsg "Deleting temp directory and its contents"
|
LogMsg "Deleting temp directory and its contents"
|
||||||
#Try { Remove-Item -Path $TEMPDIR -Recurse -Force -ErrorAction SilentlyContinue }
|
Try { Remove-Item -Path $TEMPDIR -Recurse -Force -ErrorAction SilentlyContinue }
|
||||||
#Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
|||||||
Reference in New Issue
Block a user