Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: QUICKLY changing default browsers between Firefox and Edge (and back).  (Read 16406 times)

0 Members and 1 Guest are viewing this topic.

Sebastian42

    Topic Starter


    Intermediate

    • Yes
  • Certifications: List
  • Experience: Experienced
  • OS: Windows 10
Whether using AutoHotKey, Macro, VBS, Powershell, Power Automate, batch-file - I don't mind - whatever works to quickly toggle the browser DEFAULT state between Edge and Firefox.

DaveLembke



    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: QUICKLY changing default browsers between Firefox and Edge (and back).
« Reply #1 on: September 23, 2021, 09:07:46 PM »
Basically you would have to edit the registry of Windows to changing the default browser... but don't quite know the reasoning behind changing it quickly between them.

Can you describe further what your trying to do and why so that perhaps understanding your need we can provide a sound solution for it as changing registry values can lead to issues if done incorrectly.

Sebastian42

    Topic Starter


    Intermediate

    • Yes
  • Certifications: List
  • Experience: Experienced
  • OS: Windows 10
Re: QUICKLY changing default browsers between Firefox and Edge (and back).
« Reply #2 on: September 24, 2021, 09:26:15 PM »
I doubt whether changing the registry is the answer. I want a TOGGLE, to be able to go QUICKLY between one or other as default.
My Firefox is quite old and so not suitable for many 'modern applications', that is why I want to be able to set Edge as a default.
But there are situations where my old Firefox can do what modern Edge can NOT, and it is required to be called repeatedly, that is why I want it as a DEFAULT until that task is finished, and then I'll go back to Edge. I want that going back and forth to be as quick as a click.

DaveLembke



    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: QUICKLY changing default browsers between Firefox and Edge (and back).
« Reply #3 on: October 01, 2021, 03:12:49 PM »
You can specify what browser to launch and point it to a specific URL path if that is the need. Such as this instruction placed into a batch file.

There is no way to change default browser without messing in registry of whatever Windows is going to have set as the default; however you can call to a browser of choice and pass a URL to it like below.

If you want to make a TOGGLE program or script, it would be basically calling the browser and passing a URL like below which ignores whatever Windows has as its default browser as this is an explicit call to using specific browser to get to specific website.

Code: [Select]
start "c:\Program Files\Mozilla Firefox\Firefox.exe" www.google.com
Here is a list of browsers:

Code: [Select]
     iexplore.exe www.google.com
     chrome www.google.com
     firefox.exe www.google.com
     microsoft-edge:www.google.com

Sebastian42

    Topic Starter


    Intermediate

    • Yes
  • Certifications: List
  • Experience: Experienced
  • OS: Windows 10
Re: QUICKLY changing default browsers between Firefox and Edge (and back).
« Reply #4 on: October 15, 2021, 10:50:22 PM »
If I understand you correctly
start "c:\Program Files\Mozilla Firefox\Firefox.exe" www.google.com
in a batch file, will 'force' the browser to open Google to be Firefox.

Other browsers can likewise be forced (to open Google).

But it is not Google that I want the browsers to open.
I just want a particular browser to accept the 'next few' URLs.

Or have I misunderstood you ?


DaveLembke



    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: QUICKLY changing default browsers between Firefox and Edge (and back).
« Reply #5 on: October 21, 2021, 12:19:27 AM »
To have the specific browser handle a URL, it would have to be specific in knowing the URL path and having the batch instruction tell the system to open those specific URLs with whichever specific browser of choice.

I don't know of any method of telling the system to use Firefox for example for the next 4 URL requests and then jump back to a different browser. But if there was a method it would be a service that counted how many times a URL request was performed and then registry of that system would be altered to change the default browser which goes back to the original registry mess as you would have to have Windows default browser value in registry changed. With URL paths of which should be known the batch method to explicitly have URLs handled should work, unless the URL is dynamically constructed with a website that always changes to which a URL would go stale and no longer function as a copy/paste of that URL from say a day earlier that was to the location desired has changed with its ascii character path as the website is dynamically constructed from server side scripts of which only way to get to a specific location at a website then would be if you knew of a naming convention used for the URL path such as if it has a date in its path that say the URL ended in 102021 for October 20th 2021 and the next day that URL changes to 102121 for October 21st 2021.

For example Computer Hope has a URL naming convention to which if you know the Topic and Last Message Number as looking at the URL as https://www.computerhope.com/forum/index.php?action=post;topic=182277.0;last_msg=1011831 and you wanted to go to a different topic or message number you could pass the different known values in and get to the other pages within. If the website had predictable or known URL information you can navigate that website without the hyperlinks of that website and go direct to pages through Batch and other scripted methods to access the webpages. I use to use this method for websites that made it easy to navigate around them without use of keyboard/mouse macros and then parse information from the pages as I made a custom browser handler in C# years ago that allowed playing around with websites to gather information when URL path naming convention was known to getting the information because the websites URL path wasnt a mess of characters that made no logical sense but by which were created by the dynamic websites construction and pages constructed within of what appears to be random string generator appended to the main domain such as some website that ends in a URL path of r7YtFggRwWq87cVb