Change default program for .html

Page 1 of 2 12 LastLast

  1. Posts : 31
    Windows 7 64bit
       #1

    Change default program for .html


    I need .html files when I click them in explorer to open in Firefox. Win7 64bit.

    If I turn on "check to make sure firefox is default browser" it will check and ask and I can set it. Problem solved.

    But I need to make firefox open with "-profile whatever" when I double click a .html file in explorer. How can I modify the firefox association/program/whatever to append the profile on the command line. I have no idea where to do this.

    Thanks.
      My Computer


  2. Posts : 7,730
    Windows 7 Ultimate SP1 64-Bit
       #2

    Navigate to Start>Control Panel>Default Programs>Set Associations.

    Default Programs - Associate a File Type or Protocol

    Change default program for .html-assoc.jpg
      My Computer


  3. Posts : 31
    Windows 7 64bit
    Thread Starter
       #3

    yes, I see that. "Firefox" is there and I can select it. But I need to change Firefox to add a "-profile whatever" so when it runs it runs properly. Right now "Firefox" is just firefox.exe probably. How can I append a switch to it? I see no where I can actually change what "Firefox" is actually executing. I can only select it.
    Attached Thumbnails Attached Thumbnails Change default program for .html-eg.jpg  
      My Computer


  4. Posts : 6,285
    Windows 10 Pro X64
       #4

    seavixen32, that won't allow him to specify which user to automatically connect with, no way to add -P profilename.

    I don't know of any way to do this? I always get the Profile Manager screen with my default preselected but I still need to click OK for it to continue.

    Edit: I wonder if you could select a batch file then have the batch file start Firefox with the -P info and the web site to open?

    Edit#2: Nope, that doesn't work, just tried it.
      My Computer


  5. Posts : 31
    Windows 7 64bit
    Thread Starter
       #5

    I could probably do a batch file thing, but thats ugly. I can't believe I can't just add a switch to the program's command line. Anyone know where exactly in the registry this command line can be found for .html?
      My Computer


  6. Posts : 6,285
    Windows 10 Pro X64
       #6

    HKEY_CLASSES_ROOT\.html but the info there point to a CSID, not a program name and there is no way to add a parameter.
      My Computer


  7. Posts : 31
    Windows 7 64bit
    Thread Starter
       #7

    I found where it is.
    HKEY_CLASSES_ROOT\FirefoxHTML\shell\open\command

    But when I try to add -profile c:\users\whatever it doesn't like it. It only wants a path to an exe for some reason. I tried all kinds of various double quote attempts.
      My Computer


  8. Posts : 1,781
    Windows 7 Professional SP1 32-bit
       #8

    You found the right registry key. On my system it looks like this:
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Classes\FirefoxHTML\shell\open\command]
    @="\"C:\\Program Files\\Mozilla Firefox\\firefox.exe\" -requestPending -osint -url \"%1\""
    If you change the line at the end to read
    -requestPending -osint -profile \"full path to your profile here\" -url \"%1\""
    it should work correctly, once you save this as a .reg file and merge it in.

    If you want to make the edit yourself using regedit, simply insert -profile "full path to your profile here" between the -osint and -url parameters.
    Note that in this case, the quote marks do not have preceding backslashes.

    EDIT: I just realized there are two occurrences of the FirefoxHTML key, one under HKEY_CURRENT_USER\Software\Classes and one under HKEY_CLASSES_ROOT. You can choose to edit both simultaneously, or try just one and see if it's the one that sticks.

      My Computer


  9. Posts : 31
    Windows 7 64bit
    Thread Starter
       #9

    I tried this, it didn't work. Can you copy/paste your REG_SZ value for HKEY_CLASSES_ROOT\FirefoxHTML\shell\open\command ?

    I didn't use regedit to import. I'm trying to edit the registry directly.
      My Computer


  10. Posts : 6,285
    Windows 10 Pro X64
       #10

    Won't this cause a problem if someone else is using the computer? They double click on a html file and your Firefox profile starts.
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:50.
Find Us