# RemoteMyDesktop Windows installer. # Usage: irm https://remotemydesktop.com/install.ps1 | iex # Downloads the 0.2.15 beta setup over HTTPS, checks its SHA-256 against the published SHA256SUMS # (the same hashes shown on the download page), and runs it. # # Everything runs inside one script block, so nothing here changes the preferences of the # PowerShell session it was pasted into, and a failure returns instead of closing that session. & { $ErrorActionPreference = "Stop" $ver = "0.2.15" $base = "https://remotemydesktop.com/downloads" $name = "RemoteMyDesktop_${ver}_x64-setup.exe" $out = Join-Path $env:TEMP $name Write-Host "Downloading RemoteMyDesktop $ver ..." try { Invoke-WebRequest -Uri "$base/$name" -OutFile $out -UseBasicParsing $sums = (Invoke-WebRequest -Uri "$base/SHA256SUMS" -UseBasicParsing).Content if ($sums -is [byte[]]) { $sums = [System.Text.Encoding]::UTF8.GetString($sums) } } catch { Write-Error "Download failed: $($_.Exception.Message)" return } $expected = $null foreach ($line in ($sums -split "`n")) { $parts = $line.Trim() -split '\s+\*?', 2 if ($parts.Count -eq 2 -and $parts[1] -eq $name) { $expected = $parts[0].ToLower(); break } } if (-not $expected) { Write-Error "SHA256SUMS lists no hash for $name; not installing." return } $actual = (Get-FileHash -Path $out -Algorithm SHA256).Hash.ToLower() if ($actual -ne $expected) { Write-Error "$name does not match its published SHA-256; not installing.`n expected $expected`n got $actual" Remove-Item -Path $out -Force -ErrorAction SilentlyContinue return } Write-Host "SHA-256 verified." Write-Host "Starting the installer ..." Start-Process -FilePath $out -Wait Write-Host "Done. If Windows SmartScreen appeared, this is an unsigned beta: choose More info then Run anyway." }