Table of Contents
What is Silent Installation?
Silent installation, also known as unattended installation, refers to the process of installing software without any user intervention or prompts. It allows for a seamless and hassle-free installation experience, particularly useful when deploying applications on multiple computers simultaneously. During a silent installation, the software is installed quietly in the background, without displaying any installation wizard or requesting user interaction.
Silent installation, or unattended installation, brings a host of benefits that streamline software deployment. Here’s a concise look at why silent installation is advantageous:
- Time and Effort Savings: Automate the installation process, eliminating manual intervention and saving valuable time and effort.
- User-Friendly Experience: Minimize interruptions and prompts, providing a seamless installation process for users, and enhancing productivity.
- Customization and Control: Tailor the installation to your organization’s needs by specifying parameters such as location, language, and components.
- Scalability and Efficiency: Easily deploy software on a large scale, saving time and ensuring a streamlined installation process.
Install Mozilla Firefox Silently (Command)
Mozilla Firefox is a free and open-source web browser developed by the Mozilla Foundation. This post shows you how to install it silently using PowerShell.
1. Right-click on the Windows Start icon then select Windows PowerShell (Admin). On Windows 11, select Terminal (Admin) instead of Windows PowerShell (Admin).
2. Enter the following command then press Enter to download and install Firefox silently.
msiexec.exe /i https://download.mozilla.org/?product=firefox-msi-latest-ssl /qn
3. After a few moments you should see a Desktop Shortcut appear. You will also find entries in the Start Menu, Installation Directory, and Programs and Features in the Control Panel.
To verify the app is installed. Run the below commands in PowerShell.
$regKeys = @('HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\')
$regKeys += 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\'
$installed = $regKeys | Get-ChildItem | Get-ItemProperty | Where-Object { $_.DisplayName -like '*Mozilla Firefox*' }
$installed | Select DisplayName, DisplayVersion, Publisher
# Here is the output. Congratulations! You've installed the app using PowerShell.
DisplayName DisplayVersion Publisher
----------- -------------- ---------
Mozilla Firefox (x64 en-US) 121.0.1 Mozilla
Install Mozilla Firefox Silently (Script)
Alternatively, we can use the below script to install Firefox silently with advanced options:
- Install only if the app is not installed yet.
- Detect and then install Firefox based on the Windows architecture (32-bit or 64-bit).
- Cleanup the resource after install automatically.
You can create a PowerShell script to install the app on local or remote computers. Also, the script can be used to deploy the app using Group Policy or Microsoft Intune.
# Check if the app is already installed (Registry detection)
$regKeys = @('HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\')
$regKeys += 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\'
$installed = $regKeys | Get-ChildItem | Get-ItemProperty | Where-Object { $_.DisplayName -like '*firefox*' }
# Check if the app is already installed (File exists detection)
$file = Test-Path -Path "C:\Program Files*\Mozilla Firefox\firefox.exe"
# Install the app if it is not installed yet
if ((($installed | Measure-Object).Count -gt '0') -or ($file -eq 'True')) {
Write-Host "The app is already installed." -ForegroundColor Yellow
} else {
# Detect and install the app based on the Windows architecture (32-bit or 64-bit)
$arch = (Get-CimInstance Win32_operatingsystem).OSArchitecture
if ($arch -match '64-bit') {
$url = 'https://download.mozilla.org/?product=firefox-msi-latest-ssl&os=win64'
} else {
$url = 'https://download.mozilla.org/?product=firefox-msi-latest-ssl'
}
Write-Host "Installing the $arch version of the app ..." -ForegroundColor Green
Start-Process -FilePath msiexec.exe -ArgumentList "/i $url /qn" -Wait
}
Bonus: If your Windows running an older PowerShell version, let’s use the following script to download and install the latest version of Mozilla Firefox.
# Create a temporary directory to store Mozilla Firefox.
New-Item -Path $env:temp\temp -ItemType Directory -ErrorAction:0 | Out-Null
# Download the Mozilla Firefox installer.
$download = Join-Path $env:temp\temp firefox_installer.exe
$url = 'https://download.mozilla.org/?product=firefox-latest&os=win64'
(New-Object System.Net.WebClient).DownloadFile($url,$download)
# Perform a silent installation of Mozilla Firefox.
Start-Process -FilePath $download -ArgumentList '/S' -Wait
# Cleanup
Remove-Item -Path $env:temp\temp -Recurse -Force
Install Mozilla Firefox Silently (Remotely)
In some cases, you want to install Mozilla Firefox on remote systems. The main way to execute remote commands is with PowerShell remoting using the Enter-PSSession or Invoke-Command cmdlets.
Note: Before you begin, make sure PSRemoting is already enabled in your environment.
Below is a basic script to install the app on multiple remote systems. The script will detect if the app is not installed and then install it based on the OS architecture.
# Define the remote computer names in an array
# $computers = @('computer1','computer2')
$computers = @('WIN10-X')
# Loop through each computer in the array
foreach ($computer in $computers) {
# Execute the script block on remote computer
Invoke-Command -ComputerName $computer -ScriptBlock {
# Check if the app is already installed (Registry detection)
$regKeys = @('HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\')
$regKeys += 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\'
$installed = $regKeys | Get-ChildItem | Get-ItemProperty | Where-Object { $_.DisplayName -like '*firefox*' }
# Check if the app is already installed (File exists detection)
$file = Test-Path -Path "C:\Program Files*\Mozilla Firefox\firefox.exe"
# Install the app if it is not installed yet
if ((($installed | Measure-Object).Count -gt '0') -or ($file -eq 'True')) {
exit
} else {
# Detect and install the app based on the Windows architecture (32-bit or 64-bit)
$arch = (Get-CimInstance Win32_operatingsystem).OSArchitecture
if ($arch -match '64-bit') {
$url = 'https://download.mozilla.org/?product=firefox-msi-latest-ssl&os=win64'
} else {
$url = 'https://download.mozilla.org/?product=firefox-msi-latest-ssl'
}
Start-Process -FilePath msiexec.exe -ArgumentList "/i $url /qn" -Wait
}
}
}
Uninstall Mozilla Firefox Silently
If the app is no longer needed. We can uninstall Firefox from your computer silently. The following commands remove either the 32-bit or 64-bit version of the installed app.
$regKeys = @('HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\')
$regKeys += 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\'
$apps = $regKeys | Get-ChildItem | Get-ItemProperty | Where-Object { $_.DisplayName -like '*firefox*' }
$apps | ForEach-Object {
$execLocation = "$($_.UninstallString.Split('"')[1])"
Start-Process -FilePath "$execLocation" -ArgumentList "-ms" -Wait
}
Install Firefox with package managers
Additionally, on Windows, we can use some package managers to install Firefox silently:
- [Recommended] Windows Packager Manager (How to use)
- Chocolatey (How to use)
- Scoop (How to use)
Install with Windows Package Manager (winget)
The winget command line tool enables users to discover, install, upgrade, remove, and configure applications on Windows computers. Windows Package Manager winget command-line tool is bundled with Windows 11 and modern versions of Windows 10 by default as the App Installer.
To install Mozilla Firefox, let’s open Windows PowerShell (Terminal) or cmd (Command Prompt) as administrator the execute the below command:
winget install Mozilla.Firefox
Found Mozilla Firefox [Mozilla.Firefox] Version 122.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://download-installer.cdn.mozilla.net/pub/firefox/US/Firefox%20Setup%20122.0.exe
██████████████████████████████ 58.4 MB / 58.4 MB
Successfully verified installer hash
Starting package install...
Successfully installed
To uninstall, run the following command:
winget uninstall Mozilla.Firefox
Install with Chocholatey
Chocolatey is a Windows counterpart to the Linux apt package manager or yum package manager. The software offers a CLI-based package installation and management in Windows with the community-maintained package repository.
The code snippets below will install the Chocolatey package manager and then install Firefox on a computer:
Set-ExecutionPolicy Bypass -Scope Process -Force
irm https://community.chocolatey.org/install.ps1 | iex
choco feature enable -n allowGlobalConfirmation
choco install firefox
Firefox v122.0.0 [Approved]
Firefox package files install completed. Performing other installation steps.
Using locale 'en-US'...
Downloading Firefox 64 bit
from 'https://download.mozilla.org/?product=firefox-122.0-ssl&os=win64&lang=en-US'
Progress: 100% - Completed download of Firefox Setup 122.0.exe (58.45 MB).
Download of Firefox Setup 122.0.exe (58.45 MB) completed.
Hashes match.
Installing Firefox...
Firefox has been installed.
WARNING: No registry key found based on 'Mozilla Firefox'
Firefox may be able to be automatically uninstalled.
The install of Firefox was successful.
Software installed to 'C:\Program Files\Mozilla Firefox'
To uninstall, run the following command:
choco uninstall firefox --force
Install with Scoop
Scoop is a free and open-source command line installer for Windows-based systems. If you are a command line lover or a Linux user who recently switched to Windows, then this is the tool you would like to use to manage your programs and plugins in your computer.
Run the following commands to install Scoop package manager, add a required Scoop’s bucket then install Mozilla Firefox silently and automatically.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex
scoop install git
scoop bucket add extras
scoop install extras/firefox-esr
Installing 'firefox-esr' (115.7.0) [64bit] from extras bucket
Firefox%20Setup%20115.7.0esr.exe (55.8 MB) [===================] 100%
Checking hash of Firefox%20Setup%20115.7.0esr.exe ... ok.
Extracting dl.7z ... done.
Linking ~\scoop\apps\firefox-esr\current => ~\scoop\apps\firefox-esr\115.7.0
Creating shim for 'firefox-esr'.
Creating shortcut for Firefox ESR (firefox.exe)
Creating shortcut for Firefox ESR Profile Manager (firefox.exe)
Persisting distribution
Persisting profile
Running post_install script...
'firefox-esr' (115.7.0) was installed successfully!
Notes
-----
To set profile 'Scoop-ESR' as *DEFAULT*, or profiles/settings was lost after update:
- Run 'Firefox ESR Profile Manager', choose 'Scoop-ESR' then click 'Start Firefox'.
- Visit 'about:profiles' page in Firefox ESR to check *DEFAULT* profile.
To remove or uninstall the app, run the below command in PowerShell or Command Prompt:
scoop uninstall extras/firefox-esr
Conclusion
That’s it! You have now successfully installed Mozilla Firefox on your computer using Powershell.
Related: Want to install more apps silently? Seach the app you need in the below table.
Name | Link (On this site) | Publisher |
---|---|---|
Mozilla Firefox | Read more...(New tab) | Mozilla |
Google Chrome | Read more...(New tab) |