guard to exit script if agent is installed

This commit is contained in:
2024-01-19 21:39:28 -05:00
parent 60df390c1b
commit 94d47954cd
+6
View File
@@ -1,5 +1,11 @@
# NOTE: The $CONFIG variable must be set by the calling script
# Exit this script if agent is already installed
If ( Test-Path "${Env:ProgramFiles}\ESET\RemoteAdministrator\Agent\ERAAgent.exe" ) {
Microsoft.Powershell.Utility\Write-Output "ESET agent is already installed. This script will now exit."
Return
}
# Set path to temp directory
$TEMPDIR = '{0}eset-protect-deployment' -f (Get-TempPath)