# ============================================================================ # dr-downloader.drraypc.com - bootstrapper # # USAGE: irm https://dr-downloader.drraypc.com | iex # # Why a bootstrapper instead of running the whole script through iex: # the full Dr. Ray Downloader relies on $PSScriptRoot and self-elevates by # relaunching its own FILE ($MyInvocation.MyCommand.Definition). Neither of # those exist when a script is piped to iex. So this tiny loader downloads the # real script to a temp file and starts it as a proper elevated .ps1, which # restores all of that behavior with zero changes to the big script. # ============================================================================ $ErrorActionPreference = 'Stop' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # Point this at wherever the FULL script lives. Your GitHub raw URL already works: $src = 'https://raw.githubusercontent.com/dr-raypc/dr-downloader/main/dr-downloader.ps1' # ...or host it on your own site, e.g. 'https://dr-downloader.drraypc.com/full.ps1' $dest = Join-Path $env:TEMP 'dr-downloader.ps1' Write-Host "`n[+] Downloading Dr. Ray Downloader..." -ForegroundColor Yellow Invoke-RestMethod -Uri $src -OutFile $dest Write-Host "[+] Launching (you'll get a UAC prompt for admin rights)...`n" -ForegroundColor Yellow Start-Process powershell.exe -Verb RunAs -ArgumentList @( '-NoProfile','-ExecutionPolicy','Bypass','-File',"`"$dest`"" )