To set Firefox as your default browser in Windows 10 directly from the command line, you need to execute a specific command using the Firefox uninstaller helper application.
Setting a default browser via the command line offers a quick and automated way to configure your system, particularly useful for scripting, IT administration, or power users.
How to Set Firefox as Default Browser via Command Line
This method leverages a utility included with your Firefox installation to register it as the default application for web browsing.
Here’s a step-by-step guide:
-
Open Command Prompt as Administrator:
- Press the
Windows key
+R
to open the Run dialog. - Type
cmd
and then pressCtrl
+Shift
+Enter
to open Command Prompt with administrative privileges. Alternatively, search for "Command Prompt" in the Start menu, right-click it, and select "Run as administrator." - Confirm the User Account Control (UAC) prompt if it appears.
- Press the
-
Execute the Command:
- In the Command Prompt window, type or paste the following command and press
Enter
:
"C:\Program Files\Mozilla Firefox\uninstall\helper.exe" /SetAsDefaultAppGlobal
- Note: The path
C:\Program Files\Mozilla Firefox\
assumes a standard installation. If you installed Firefox to a different location (e.g.,C:\Program Files (x86)\Mozilla Firefox
for 32-bit on a 64-bit system, or a custom directory), you will need to adjust the path accordingly.
- In the Command Prompt window, type or paste the following command and press
Understanding the Command
The command utilizes the helper.exe
utility, which is part of the Firefox installation. This executable is designed to assist with various maintenance tasks, including managing default application settings.
"C:\Program Files\Mozilla Firefox\uninstall\helper.exe"
: This is the full path to the helper utility. The quotes are necessary because the path contains spaces./SetAsDefaultAppGlobal
: This is a command-line switch or argument that instructshelper.exe
to register Firefox as the default application for web browsing globally on the system.
Verifying the Default Browser Setting
After executing the command, it's a good practice to verify that Firefox has indeed been set as the default browser.
There are a couple of ways to do this:
-
Through Windows Settings (GUI):
- Go to
Settings
>Apps
>Default apps
. - Under the "Web browser" section, check if "Firefox" is listed. If not, you can manually select it here.
- Go to
-
Opening a Web Link:
- Click on any web link (e.g., in an email, a document, or another application). It should now open in Firefox.
Troubleshooting and Considerations
- Administrator Privileges: Running the Command Prompt as an administrator is crucial, as modifying default application settings is a system-level operation that requires elevated permissions.
- Correct Path: Double-check your Firefox installation path if the command fails. An incorrect path will prevent the
helper.exe
from being found and executed. - Silent Operation: The command typically runs silently without providing immediate on-screen confirmation of success or failure. Verification through Windows settings or by opening a link is the best way to confirm the change.
- User Profiles: This command is intended to set Firefox as the default globally, meaning for all users. However, in some corporate environments or highly restricted systems, individual user settings might still override global defaults, or a Group Policy might enforce a different default.
By following these instructions, you can efficiently set Firefox as your default web browser on Windows 10 using the command line.