PowerShell – Install Firefox

VertigoRay/ July 26, 2013/ Uncategorized/ 0 comments

I previously posted about tweaking the Firefox install to prevent the Mozilla Maintenance Service from installing.  Ph0neutria asked an off topic that intrigued me, so this is the answer to that.

My solution installs a particular version and language of Firefox.  If the language is not specified, it will check for a current install and match that language, defaulting to en-US.

Note: You’ll want to sign the code so you can run it without changing the execution policy to unrestricted.
Sample Usage:
InstallFirefox.ps1 22.0
InstallFirefox.ps1 22.0 'es-ES'

I know the code isn’t commented, but I just use the `Write-Debug` lines as comments.  To see the debug output, you’ll need to set the DebugPreference variable:


Thought about, allowing “latest” for the version, but that would be a bit more complex since you would have to parse the page to get the version number from the latest version.  Not dificult, but beyond the scope of this solution.

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>