Neocky's blog

Unattended installation of Firefox in PowerShell

Lately I built some scripts in PowerShell to set up clients automatically and configure them.
Here is a simple 5 line long script which will install the Firefox browser unattended.

$firefox_setup = "firefoxsetup.exe"
$webclient = New-Object System.Net.WebClient
$webClient.DownloadFile("https://download.mozilla.org/?product=firefox-latest-ssl&os=win64", "$pwd\$firefox_setup")
Start-Process -FilePath "$pwd\$firefox_setup" -ArgumentList "/s" -Verb RunAs -Wait
Remove-Item "$pwd\$firefox_setup"  # remove installer afterwards

Enjoy :)

#powershell