kavaa Posted February 14, 2017 Posted February 14, 2017 I made a install script for CCleaner to do a Silent install and clean if needed. Improvements are welcome! When a new version of FireFox comes out, just change the firefox version or url to the new value. # Silent Install Firefox # Download URL: https://www.mozilla.org/en-US/firefox/all/ # Path for the workdir $workdir = "c:\installer\" # Check if work directory exists if not create it If (Test-Path -Path $workdir -PathType Container) { Write-Host "$workdir already exists" -ForegroundColor Red} ELSE { New-Item -Path $workdir -ItemType directory } # Download the installer $source = "https://download.mozilla.org/?product=firefox-51.0.1-SSL&os=win64&lang=en-US" $destination = "$workdir\firefox.exe" # Check if Invoke-Webrequest exists otherwise execute WebClient if (Get-Command 'Invoke-Webrequest') { Invoke-WebRequest $source -OutFile $destination } else { $WebClient = New-Object System.Net.WebClient $webclient.DownloadFile($source, $destination) } # Start the installation Start-Process -FilePath "$workdir\firefox.exe" -ArgumentList "/S" # Wait XX Seconds for the installation to finish Start-Sleep -s 35 # Remove the installer rm -Force $workdir\firefox*
vichra_ben Posted June 1, 2017 Posted June 1, 2017 Firefox has "latest" permalinks, you can use that and it will always pull the newest version https://download.mozilla.org/?product=firefox-latest&os=win64&lang=en-US https://download.mozilla.org/?product=firefox-latest&os=win&lang=en-US
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now