Switch TacticalRMM download to WebClient for redirect handling
Invoke-WebRequest hangs on the TacticalRMM download URL (same redirect issue previously fixed for RustDesk). Use WebClient.DownloadFile instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
3ff00aca6d
commit
d3844a857c
@@ -177,7 +177,7 @@ If (Get-Service $serviceName -ErrorAction SilentlyContinue) {
|
|||||||
|
|
||||||
Try {
|
Try {
|
||||||
Write-Host "Downloading TacticalRMM agent..."
|
Write-Host "Downloading TacticalRMM agent..."
|
||||||
Invoke-WebRequest -Uri $downloadlink -OutFile "$OutPath\$output" -UseBasicParsing -ErrorAction Stop
|
(New-Object System.Net.WebClient).DownloadFile($downloadlink, "$OutPath\$output")
|
||||||
Write-Host "Download complete."
|
Write-Host "Download complete."
|
||||||
Start-Process -FilePath "$OutPath\$output" -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES' -Wait
|
Start-Process -FilePath "$OutPath\$output" -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES' -Wait
|
||||||
Write-Host "Extracting..."
|
Write-Host "Extracting..."
|
||||||
|
|||||||
Reference in New Issue
Block a user