diff --git a/Datto-RMM/scripts/InstallHuntress.dattormm.comstore.ps1 b/Datto-RMM/scripts/InstallHuntress.dattormm.comstore.ps1 index 328260a..f781946 100644 --- a/Datto-RMM/scripts/InstallHuntress.dattormm.comstore.ps1 +++ b/Datto-RMM/scripts/InstallHuntress.dattormm.comstore.ps1 @@ -1065,7 +1065,8 @@ function main () { } else { LogMessage "Checking for HuntressAgent install..." $agentPath = getAgentPath - if ( (Test-Path $agentPath) -eq $true) { + $agentExe = Join-Path $agentPath "HuntressAgent.exe" + if ( (Test-Path $agentExe) -eq $true) { LogMessage "The Huntress Agent is already installed in $agentPath. Exiting with no changes. Suggest using -reregister or -reinstall flags" copyLogAndExit } diff --git a/Powershell/InstallHuntress.powershellv2.ps1 b/Powershell/InstallHuntress.powershellv2.ps1 index 84ede1f..6d78602 100644 --- a/Powershell/InstallHuntress.powershellv2.ps1 +++ b/Powershell/InstallHuntress.powershellv2.ps1 @@ -1054,7 +1054,8 @@ function main () { } else { LogMessage "Checking for HuntressAgent install..." $agentPath = getAgentPath - if ( (Test-Path $agentPath) -eq $true) { + $agentExe = Join-Path $agentPath "HuntressAgent.exe" + if ( (Test-Path $agentExe) -eq $true) { LogMessage "The Huntress Agent is already installed in $agentPath. Exiting with no changes. Suggest using -reregister or -reinstall flags" copyLogAndExit }