@(set "0=%~f0"^)#) & powershell -nop -c iex([io.file]::ReadAllText($env:0)) & exit /b #:: just copy-paste into powershell - it's a standalone hybrid script $url = 'https://download.mozilla.org/?product=firefox-stub' $setup = "$((new-object -ComObject Shell.Application).NameSpace('shell:Downloads').Self.Path)\Firefox Installer.exe" write-host $url Invoke-WebRequest $url -OutFile $setup start $setup Remove-Item $setup