fix: use curl.exe for download in install.ps1 (more reliable on Windows 10+)
This commit is contained in:
parent
f7d29a98d3
commit
fe1b385776
1 changed files with 8 additions and 3 deletions
|
|
@ -13,9 +13,14 @@ $url = "https://agent-helios.me/downloads/helios-remote/helios-remote-client-wi
|
|||
$dest = "$env:USERPROFILE\Desktop\Helios Remote.exe"
|
||||
|
||||
Write-Host "Downloading helios-remote client..."
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
$wc = New-Object System.Net.WebClient
|
||||
$wc.DownloadFile($url, $dest)
|
||||
|
||||
# Try curl.exe first (built-in on Windows 10+), fall back to WebClient
|
||||
if (Get-Command curl.exe -ErrorAction SilentlyContinue) {
|
||||
curl.exe -L -o $dest $url
|
||||
} else {
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
(New-Object Net.WebClient).DownloadFile($url, $dest)
|
||||
}
|
||||
|
||||
Write-Host "Starting..."
|
||||
Start-Process -FilePath $dest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue