switch back to standard download
use new function WriteToFile_UTF8NoBOM
This commit is contained in:
@@ -16,7 +16,8 @@ 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 | 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 }
|
Catch { LogMsg "Cannot write configuration file! This script will exit." ; LogErr $_.Exception.Message ; Exit }
|
||||||
|
|
||||||
# Get bitness of endpoint and set $AGENTNAME
|
# 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
|
# 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
|
#$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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user