Hi everyone..

I have a flash drive which contains a portable version of Mozilla Firefox. I want to save an existing textfile on that flash drive as a HTML file using the portable firefox browser. Unfortanately, i'm using Chrome as my default web browser. Is there any way to save the text file as a Html file and make is to be viewed as a Mozilla Firefox file. Even when I save MyDocument.txt as MyDocument.html on the flash drive (and I have the portable version of firefox on my flash drive) as an html file it still comes up as a chrome document.

Any idea how I can steer the document to be seen as a Firefox file. Maybe it has to do with the fact that if my default browser has changed then I can only see the document in that format? ....If this is the case then if I was on a machine which didn't have a web browser would it automatically steer to the portable version of the Mozilla Firefox browser I have on my flash drive?

Thans so much.

Dani AI

Generated

As pointed out, which program opens an .html file is decided by the host Windows installation — double‑clicking uses the machine’s file‑type association (Default Programs / Default Apps), not a file on the USB. You cannot make a file on the flash drive magically “be a Firefox file” on every PC without changing that PC’s default program settings. (support.microsoft.com)

A practical, reliable cross‑machine workaround is to ship a small launcher on the USB that starts the portable Firefox and passes the HTML file path using a relative reference (so it works even if the drive letter changes). Example (place the .bat next to your FirefoxPortable folder):

@echo off
REM launcher.bat — opens MyDocument.html with the local FirefoxPortable
set SCRIPT_DIR=%~dp0
"%SCRIPT_DIR%FirefoxPortable\FirefoxPortable.exe" "%SCRIPT_DIR%MyDocument.html"

Double‑clicking that launcher (instead of the .html) will open the page in the portable browser on any PC the flash drive is attached to.

If you really want a true double‑click on the .html to open FirefoxPortable on a particular machine, the only way is to change that machine’s default for .htm/.html to point at the portable EXE. That stores an absolute path in the registry and will usually break if the USB gets a different drive letter; registry hacks exist but are fragile and may require admin rights. (winhelponline.com)

Also note Windows blocks automatic execution from most USB flash drives (autorun/autorun.inf behavior was restricted for removable media), so you can’t rely on autorun to flip settings or launch the browser automatically. (learn.microsoft.com)

Summary: change the host defaults if you control the machines, or include a small launcher on the USB (the launcher approach is the least fragile and requires no registry editing).

Recommended Answers

All 3 Replies

Member Avatar for Member #46692

If I am understood that correctly, you want to right-click and choose open with firefox, assuming you are on a windows OS.
What is a portable version of firefox? I've never heard of it.

Hi, Thanks for coming back.
What I want to do is this. Lets say I have my PC set up with Windows XP and Internet explorer as my default web browser. But I have a program which I carry on a flash drive which generates html files. If I open one of those files on my flash drive it will be viewed by Internet explorer on my pc because thats my default browser. But, if I carry a portable version of Firefox such as the one on this link: Click Here, then is there a way for those files carried on my flash drive to open using the portable version of firefox I carry on my flash drive automaticall? I don't want to select open with, I want it to happen by default. Is that possible?

Thanks

Member Avatar for Member #46692

I very much doubt it unless you change the Operating System's default open with application for html files. Why is there a particular need to open with firefox anyway?

Assuming you have following html/css standards the files should render the same across all browsers, (well except the ie6/7 monstrosities)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.