4

I have windows server 2008 r2 enterprise and windows 7 machines. I have firefox 4.0.1 currently deploying through group policy to the windows 7 machines.

I know how to create a login script. I have created a batch file to make firefox default, but does anyone know how to run the command without creating a requires elevation (admin privileges) prompt, since it has to start firefox.exe?

Login batch:

start firefox.exe -silent -setDefaultBrowser
Zachary
  • 43
  • 1
  • 1
  • 3

2 Answers2

7

You might want to look at achieving this via two separate methods, i.e. one to set FF as default, the other to launch it at login.

That said, in case you want to know, default browser setting is stored in the registry under

HKEY_CURRENT_USER\Software\Classes\http\shell\open\command

Use your preferred method for setting registry entries (with your server and client systems you can do this directly in group policy without scripting, or you can use a batch script to import the registry key, or you can use Powershell to edit the registry directly. Take your pick). For editing the user portion of the registry (HKCU rather than HKLM) elevated permissions are not required.

There is a system default stored in the same place under HKLM, but the user preference takes priority.

Mark Henderson
  • 68,316
  • 31
  • 175
  • 255
Matt
  • 1,883
  • 5
  • 26
  • 39
  • Here is what it should be for anyone who wants to know. "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -requestPending -osint -url "%1" – Zachary May 16 '11 at 04:20
  • And for https `Software\Classes\https\shell\open\command` – emirjonb Nov 18 '14 at 14:12
0

Another thing I noticed is that in an GPO setting the correct code will be different depending on whether or not the client's computer will be using 32-bit vs 64-bit.

The Path:

  • 32-Bit: "C:\Program Files\Mozilla Firefox\firefox.exe"
  • 64-Bit: "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"

If you set it via a GPO registry setting you will need to target the particular machine. Server Fault has a page on how to do this.

Group policy preferences that only target 32bit or 64bit os

Basically you will:

  1. Create two registry entries
  2. Select the Common Tab
  3. Select Item-Level Targeting (click the Targeting)
  4. Create a New Item (WMI)
  5. Enter the query from the linked page above.
WillM
  • 1