From 640567d03e7d088bd989bf872ebc3bfaa9ada537 Mon Sep 17 00:00:00 2001 From: uhlwoogi Date: Wed, 15 Apr 2026 10:51:10 +0000 Subject: [PATCH] Switch to WebClient.DownloadFile for reliable redirect handling Co-Authored-By: Claude Sonnet 4.6 --- 1-estudio-Install-TacticalRMM-and-RustDesk.ps1 | 2 +- 2-estudio-Install-RustDesk-Standalone.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/1-estudio-Install-TacticalRMM-and-RustDesk.ps1 b/1-estudio-Install-TacticalRMM-and-RustDesk.ps1 index 92bff7b..7792415 100644 --- a/1-estudio-Install-TacticalRMM-and-RustDesk.ps1 +++ b/1-estudio-Install-TacticalRMM-and-RustDesk.ps1 @@ -29,7 +29,7 @@ function Install-RustDesk { # Download Write-Host "Downloading ScoutIT Remote Support client..." Try { - Invoke-WebRequest -Uri $rustdeskDl -OutFile $msiPath -UseBasicParsing + (New-Object System.Net.WebClient).DownloadFile($rustdeskDl, $msiPath) } Catch { Write-Warning "RustDesk download failed: $($_.Exception.Message)" diff --git a/2-estudio-Install-RustDesk-Standalone.ps1 b/2-estudio-Install-RustDesk-Standalone.ps1 index a150bcd..de518a1 100644 --- a/2-estudio-Install-RustDesk-Standalone.ps1 +++ b/2-estudio-Install-RustDesk-Standalone.ps1 @@ -20,7 +20,7 @@ if ($null -ne $svcCheck) { $msiPath = "$env:SystemRoot\Temp\$rustdeskMsi" Write-Host "Downloading ScoutIT Remote Support client..." Try { - Invoke-WebRequest -Uri $rustdeskDl -OutFile $msiPath -UseBasicParsing + (New-Object System.Net.WebClient).DownloadFile($rustdeskDl, $msiPath) } Catch { Write-Error "Download failed: $($_.Exception.Message)"