Compare commits

..
2 Commits
Author SHA1 Message Date
dyoder 8f97ffe818 don't change location, delete working dir 2022-11-11 13:37:50 -05:00
dyoder c26632ca88 get protect agent from private repo 2022-11-11 13:35:11 -05:00
+5 -7
View File
@@ -24,19 +24,17 @@ 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://download.eset.com/com/eset/apps/business/era/agent/latest/{0}' -f $AGENTNAME
$URL = 'https://dev.emberkom.com/emberkom/management-scripts/src/branch/master/resources/eset_protect_{0}' -f $AGENTNAME
LogMsg "Downloading ESET Management Agent"
Download-File -URL $URL -File $INSTALLER
# Change working directory to $TEMPDIR
Set-Location -Path $TEMPDIR
# Install the app
LogMsg "Installing ESET Management Agent from ""${INSTALLER}"""
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${INSTALLER} /qn /norestart /log installer.log" -Wait }
Catch { LogErr $_.Exception.Message }
# Delete the installer
#LogMsg "Deleting temp directory and its contents"
#Try { Remove-Item -Path $TEMPDIR -Recurse -Force -ErrorAction SilentlyContinue }
#Catch { LogErr $_.Exception.Message }
LogMsg "Deleting temp directory and its contents"
Try { Remove-Item -Path $TEMPDIR -Recurse -Force -ErrorAction SilentlyContinue }
Catch { LogErr $_.Exception.Message }