diff --git a/windows/Install-ConnectSecureAgent.ps1 b/windows/Install-ConnectSecureAgent.ps1 index 373f675..95cef08 100644 --- a/windows/Install-ConnectSecureAgent.ps1 +++ b/windows/Install-ConnectSecureAgent.ps1 @@ -6,8 +6,8 @@ $TenantId = '' $CompanyId = '' $UserSecret = '' -$AgentInstallUrl = (Invoke-RestMethod -Method "Get" -URI "https://configuration.myconnectsecure.com/api/v4/configuration/agentlink?ostype=windows&msi_required=true") -$AgentInstallFile = 'cybercnsagent.msi' +$AgentInstallUrl = (Invoke-RestMethod -Method "Get" -URI "https://configuration.myconnectsecure.com/api/v4/configuration/agentlink?ostype=windows") +$AgentInstallFile = 'cybercnsagent.exe' $AgentInstallPath = Join-Path -Path $PackagesPath -ChildPath $AgentInstallFile # Prep @@ -24,8 +24,9 @@ Write-Host "Downloading agent installer..." # Install Write-Host "Starting installation..." -Start-Process msiexec -ArgumentList "/i `"$AgentInstallPath`" /q WRAPPED_ARGUMENTS=`"-c $CompanyId -e $TenantId -j $UserSecret -i`" /lv `"$($AgentInstallPath).log`"" -Wait -Write-Host "Log saved at $($AgentInstallPath).log" +Start-Process -FilePath $AgentInstallPath -ArgumentList "-c $($CompanyId) -e $TenantId -j $UserSecret -i" -Wait +#Start-Process msiexec -ArgumentList "/i `"$AgentInstallPath`" /q WRAPPED_ARGUMENTS=`"-c $CompanyId -e $TenantId -j $UserSecret -i`" /lv `"$($AgentInstallPath).log`"" -Wait +#Write-Host "Log saved at $($AgentInstallPath).log" # Clean up