don't change location, delete working dir
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user