Worklet: Install Mozilla Firefox on Windows

Hi all,

Just posting my method of installing Firefox (I know you can use a Required Software policy but that wasn’t going to work for us)

Simply if you download the Firefox MSI via and then upload it, once uploaded, make sure the file name matches in the remediation script. This then checks whether a temp folder on c:\ exists, if so, skips, if not, creates, then checks if Mozilla Firefox exists in Program Files, if not, it installs it.


if (Test-Path -Path "C:\Program Files\Mozilla Firefox") 
	exit 0
	Exit 1 


$path = "C:\temp\"

if(!(Test-Path -path $path))  
    New-Item -ItemType directory -Path $path -Verbose
    Write-Output "The folder path has been created successfully at $path" 
    Write-Output "The folder $path already exists"

Start-Transcript -Verbose -Path "c:\temp\firefox.log"

Copy-Item "firefox_setup_86.msi"  -Destination "C:\temp\firefox_setup_86.msi" -Verbose

$firefoxpath = "C:\Program Files\Mozilla Firefox"

# Check if Firefox is installed
if (Test-Path $firefoxpath -Verbose) {
    Write-Output "Firefox is already installed. Skipping..."
    Write-Output "Exit Code: $LASTEXITCODE"
else {
    Write-Output "Firefox not installed, installing..."
    Start-Process -FilePath 'msiexec.exe' -ArgumentList '/qn', '/i', 'C:\temp\firefox_setup_86.msi' -Verbose
    Write-Output "Firefox has been installed."



1 Like