Switch to WebClient.DownloadFile for reliable redirect handling
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
2b95f87565
commit
640567d03e
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user