My organization uses Windows 10 VirtualBox VMs to test our internal applications. The way we do this is by creating an OVA that is already connected to our domain. Anyone on the domain can log into it. However, our application initiates a single sign on java applet over the web.

I need to force FireFox as the default for all user profiles. When the VM is exported, setting FireFox as the default only applies to my profile, presumably because the other user profiles don't exist yet.

I'm thinking of tasking a VBS script to modify the registry on login for all users. Is there a more elegant way of doing this?

Thank you


What worked for me was the procedure suggested by @tyelford, which is similar to the one to make Chrome default browser on Windows 10. Unfortunately, Firefox does not have such a great how to, so I decided to copy it here and adapt it for Firefox:

Make Firefox default browser on Windows 10

As an administrator you may need to configure Firefox as the default browser on computers in your domain. To set Firefox as the default browser on domain-joined computers running Microsoft® Windows 10® and above, you must:

  • create a default application association XML file or use the provided sample file
  • create a Group Policy Object (GPO)
  • set a default associations configuration file

Microsoft® TechNet® contains detailed information on how to generate default application associations files and how to use a group policy to set the default browser.

Create a default application association XML file

The default application association file is an XML file that associates a file type with an application. For example, if you associate .html or .htm files with the Firefox application, then by default Firefox is launched each time the user opens a html or htm file.

For domain-joined computers, you create a single shared XML file that automatically sets Firefox as the default browser application. You must place this file in a shared folder, on your server, that all of the domain-joined computers can access.

Note: If Firefox is not installed on the target computer, the file associations are not applied and users must choose an application when they open a link (http or https) or file (html or htm).

The following example (firefoxdefault.xml) shows how to set Firefox as the default browser to open html, htm, http, and https files or links:

<?xml version="1.0" encoding="UTF-8"?>
  <Association Identifier=".htm" ProgId="FirefoxHTML" ApplicationName="Firefox" />
  <Association Identifier=".html" ProgId="FirefoxHTML" ApplicationName="Firefox" />
  <Association Identifier=".shtml" ProgId="FirefoxHTML" ApplicationName="Firefox" />
  <Association Identifier=".xht" ProgId="FirefoxHTML" ApplicationName="Firefox" />
  <Association Identifier=".xhtml" ProgId="FirefoxHTML" ApplicationName="Firefox" />
  <Association Identifier="ftp" ProgId="FirefoxURL" ApplicationName="Firefox" />
  <Association Identifier="http" ProgId="FirefoxURL" ApplicationName="Firefox" />
  <Association Identifier="https" ProgId="FirefoxURL" ApplicationName="Firefox" />

(that file I actually made myself using my computer)

Note: The default association policy is set at each login. The user can change an association after they login, but the change applies to that login session only. The association will be reset to the policy at the next login.

Create a Group Policy Object

The Group Policy Management console lets you create and manage Group Policy Objects (GPO) for your domain. These GPOs control the policies that are applied to all your domain-linked computers. After you create the GPO, you use security filtering to apply it to the computers in your domain.

In the following example, you create a GPO (Set Firefox as default browser) and apply it to computers in the firefoxforwork.com domain.

  1. Open the Group Policy Management Console. Go to Start > All programs > Administrative Tools > Group Policy Management.
  2. In the navigation pane, go to Group Policy Management > Domains.
  3. In the navigation pane, right-click on the firefoxforwork.com domain, and click Create a GPO in this domain, and Link it here...
  4. Type the name of the new GPO (in our example, the name is Set Firefox as default browser) and click OK.
  5. In the navigation pane, go to Group Policy Management > Domains > firefoxforwork.com > Group Policy Objects and select Set Firefox as default browser.
  6. In the Security Filtering pane, click Add.
  7. In the Select User, Computer, or Group window, type the name of the object you want to add, click Check Names (to verify the name you entered), and click OK. You can type Domain Computers to add all workstations and servers joined to this domain (as in the example below) or you can specify a different group of computers.
  8. The GPO now applies to all domain-linked computers.

Set a default associations configuration file

To set the default associations configuration file for domain-linked computers, you edit the related GPO on your windows server.

  1. Open the Group Policy Management Console. Go to Start > All programs > Administrative Tools > Group Policy Management.
  2. In the navigation pane, click Group Policy Management > Domains > firefoxforwork.com.
  3. Click the Linked Group Policy Objects tab to view all GPOs for this domain.
  4. Right-click on the GPO you want to select, and click Edit to open the Group Policy Management Editor. In this example, right-click on Set Firefox as default browser.
  5. In the Group Policy Management Editor, go to Computer Configuration > Policies > Administrative Template > Windows Components > File Explorer, and double-click Set a default associations configuration file.
  6. In the Set a default associations configuration file window, select the Enabled option.
  7. In the Options box, enter the location of your default application association XML file. This is the XML file that associates file types (such as .htm, .html, http, and https) with the Firefox application. This can be the Firefox provided sample XML file or one you created yourself.

Note: The file can’t be a local file on the server. It must be at a location that is accessible to every computer in the domain.

Verify your configuration

On your target computers (that is, the Active Directory domain-joined computers running Windows 10), you can verify that the GPO you created has been applied, and that the computer is using Firefox as the default browser.

The GPO is applied automatically when the policy is refreshed by the Windows Client, or you can run the GPUpdate.exe /force command to force a manual refresh at any time.

Note: After the policy is downloaded and applied, the computer must be rebooted in order for the policy to take effect.

  1. On a Windows Client, go to Windows > System32. Right-click rsop.msc and select run as administrator.
  2. Authenticate with administrator credentials and click Yes.
  3. Go to Computer Configuration > Administrative Templates > Windows Components > File Explorer to confirm that Set a default associations configuration file is available.
  4. Open the Set a default associations configuration file to confirm that the setting is enabled and that the XML file location is correct.
  5. When Firefox is set as the default browser, then all files with htm and html extensions use the Firefox icon.

Reference: Make Chrome default browser on Windows 10 - Chrome for business and education Help

Other pages that may be helpful:

  • Read more ... there is an Update – bjoster Oct 15 '18 at 16:05

I definitely overthought the heck out of this one.

I just tasked the following on each login:

firefox.exe -silent -nosplash -setDefaultBrowser
  • Nice, often the easiest solutions are the best – tyelford Dec 5 '15 at 10:29
  • I just use CopyProfile to customize the default user profile. That way it also covers setting a home page, adding an add-on, customizing the same settings in Internet Explorer, customizing the Start Menu, etc. – WinOutreach2 Dec 9 '15 at 16:10
  • Does not work on Windows 10 AU – laktak Sep 15 '16 at 13:27

To copy all the current user app associations, like browser, to any new user, you can do :

DISM /Online /Export-DefaultAppAssociations:"%TEMP%\AppAssoc.xml"
DISM /Online /Import-DefaultAppAssociations:"%TEMP%\AppAssoc.xml"
DEL /q "%TEMP%\AppAssoc.xml"

Remark : Import have no effect on existing users.

For those, like me, who try to do a sysprep, you can do, from your default profile :

DISM /Online /Export-DefaultAppAssociations:"%WINDIR%\System32\Sysprep\AppAssoc.xml"

And add the folling code in "%WINDIR%\Setup\Scripts\SetupComplete.cmd" :

DISM /Online /Import-DefaultAppAssociations:"%WINDIR%\System32\Sysprep\AppAssoc.xml"

The "SetupComplete.cmd" script will be run before the first user creation. (See Add a Custom Script to Windows Setup)


The XML above will no longer work! There is an update to Antonio's superb documentation:

Firefox currently (version 60 as of now) will no longer use ProgId="FirefoxURL" or "FirefoxHTML" but ProgId="FirefoxURL-308046B0AF4A39CB" or FirefoxHTML-308046B0AF4A39CB.

Please keep that in mind! I only found one hint on https://github.com/MrAlex94/Waterfox/issues/384 about that issue.

This is what my default associations look like

<Association Identifier=".pdf" ProgId="FirefoxHTML-308046B0AF4A39CB" ApplicationName="Firefox" />
<Association Identifier=".htm" ProgId="FirefoxHTML-308046B0AF4A39CB" ApplicationName="Firefox" />
<Association Identifier=".html" ProgId="FirefoxHTML-308046B0AF4A39CB" ApplicationName="Firefox" />
<Association Identifier=".shtml" ProgId="FirefoxHTML-308046B0AF4A39CB" ApplicationName="Firefox" />
<Association Identifier=".xht" ProgId="FirefoxHTML-308046B0AF4A39CB" ApplicationName="Firefox" />
<Association Identifier=".xhtml" ProgId="FirefoxHTML-308046B0AF4A39CB" ApplicationName="Firefox" />
<Association Identifier="ftp" ProgId="FirefoxURL-308046B0AF4A39CB" ApplicationName="Firefox" />
<Association Identifier="http" ProgId="FirefoxURL-308046B0AF4A39CB" ApplicationName="Firefox" />
<Association Identifier="https" ProgId="FirefoxURL-308046B0AF4A39CB" ApplicationName="Firefox" />
<Association Identifier=".url" ProgId="FirefoxURL-308046B0AF4A39CB" ApplicationName="Firefox" />

In case this changes with future releases of Firefox please set it as default browser manually and run

dism /online /Export-DefaultAppAssociations:"c:\DefaultAppAssociations.xml"

to check the current valid ProgId.


I've done this with domain group policy but it may also work with local computer group policy on that one computer.

Set up your default app associations

Go to Default Programs in Windows and change which ever apps you want as default. In your case, set Firefox to have all it's defaults. You can also set other ones that might be convenient for your needs.

Export the default app associations to a file

Open a command prompt as administrator and type in the following command

dism /Online /Export-DefaultAppAssociations:\\\c$\temp\Apps.xml

Change the output location of the file to somewhere that makes sense to you.

Set the default app associations via group policy

In group policy go to

Computer Config --> Policies --> Admin Template --> Windows Components --> File Explorer --> Set a default associations configuration file

Set it to enable and put in the location of the file where the location of the file will be local to the computer, example: C:\temp\Apps.xml

Open CMD as administrator and type gpupdate /force, restart you PC and see what you get.

To open local group policy

Open a run prompt (Windows Key + R) and type mmc

In MMC go to File --> Add/Remove Snap In and click on Group Policy Object, then click Add >. It will pre fill in Local Computer and click Finish. Now you can edit the local group policy on that machine.

  • If using a domain policy isn't feasible. This can also be done by creating creating a new image with sysprep. In other words create an image of Windows 10 for these virtual machines that are already setup how you want them to be. You can simply use the what is described in this answer, create the image, then use that image in the future. You can also do something like this if you want. – Ramhound Dec 3 '15 at 12:32
  • It doesn't seem like local group policy is being enforced and sysprep is a bit overkill. I'll probably have to do registry writes. – Amorphous Dec 4 '15 at 17:34

You can do a GPO to force default applications for computers in a given AD container.

The GPO is in Computer Configuration->Policies->Administrative Templates->Windows Components->File Explorer.

Turn on "Set a default associations configuration file" and point it to the xml file containing your default setting.

To create the XML file the easiest way is to simply set your defaults on a system and then export them. Use the exported file (delete what you don't want to force) to set the new GPO defaults. Open an elevated command prompt and run

dism /online /Export-DefaultAppAssociations:"c:\DefaultAppAssociations.xml"

This will make the file you will then point to in your GPO. Make sure to put it in a location your users can access.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.