log testing

This commit is contained in:
2022-11-10 19:46:37 -05:00
parent 49749d4f03
commit 321ac1c3ea
+5 -5
View File
@@ -6,7 +6,7 @@ $TEMPDIR = '{0}eset-protect-deployment' -f (GetTempPath)
# Recursively delete $TEMPDIR if it already exists
If ( Test-Path $TEMPDIR ) {
LogMsg """${TEMPDIR}"" already exists and will be deleted"
Try { Remove-Item -Path $TEMPDIR -Recurse -Force }
Try { Remove-Item -Path $TEMPDIR -Recurse -Force -ErrorAction SilentlyContinue }
Catch { LogErr $_.Exception.Message }
}
@@ -33,10 +33,10 @@ 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 }
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 }