don't change location, delete working dir

This commit is contained in:
2022-11-11 13:37:50 -05:00
parent c26632ca88
commit 8f97ffe818
+4 -4
View File
@@ -31,10 +31,10 @@ Download-File -URL $URL -File $INSTALLER
# Install the app
LogMsg "Installing ESET Management Agent from ""${INSTALLER}"""
Try { Set-Location -Path $TEMPDIR ; Start-Process "msiexec.exe" -ArgumentList "/i ${INSTALLER} /qn /norestart /log installer.log" -Wait }
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 }