switch back to standard download

use new function WriteToFile_UTF8NoBOM
This commit is contained in:
2022-11-11 15:10:59 -05:00
parent 73f976c38a
commit d11dad75ca
+4 -3
View File
@@ -16,7 +16,8 @@ Try { New-Item -Path $TEMPDIR -ItemType Directory -Force -ErrorAction Stop }
Catch { LogErr $_.Exception.Message ; Exit }
# Write $CONFIG to install_config.ini
Try { $CONFIG | Out-File -FilePath "${TEMPDIR}\install_config.ini" -Force -ErrorAction Stop }
#Try { $CONFIG | Out-File -FilePath "${TEMPDIR}\install_config.ini" -Force -ErrorAction Stop }
Try { $CONFIG | WriteToFile_UTF8NoBOM -FilePath "${TEMPDIR}\install_config.ini" }
Catch { LogMsg "Cannot write configuration file! This script will exit." ; LogErr $_.Exception.Message ; Exit }
# Get bitness of endpoint and set $AGENTNAME
@@ -24,8 +25,8 @@ If ( Is64bit ) { $AGENTNAME = "agent_x64.msi" } Else { $AGENTNAME = "agent_x86.m
# Download the installer
$INSTALLER = "${TEMPDIR}\${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
$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"
Download-File -URL $URL -File $INSTALLER