change location to tempdir before install

This commit is contained in:
2022-11-10 19:00:40 -05:00
parent f0b6075940
commit c0eee62f1e
+3
View File
@@ -19,6 +19,9 @@ $URL = 'https://download.eset.com/com/eset/apps/business/era/agent/latest/{0}' -
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" -Wait }