• Tutorial: How to set up any batch script as your Windows default web br

    From Marion@3:633/280.2 to All on Wed Aug 20 01:34:53 2025
    Subject: Tutorial: How to set up any batch script as your Windows default web browser

    Tutorial:
    How to set up any batch script as your Windows default web browser
    [Tested only once. By me. Today. On Windows 10. For privacy.]

    Today I set up a bogus default web browser in Windows 10 that I document
    below so that others who are annoyed by "things popping up" can annul them.

    Normally I'd want to set up the Mozilla-based Tor web browser (TBB)
    as the browser default since it doesn't connect automatically by default.

    But apparently Tor isn't registered as a web browser in Windows.
    We could register Tor as a browser - but this may be a better way.

    1. Create a batch file that does whatever you want
    2. Convert that batch file to a Windows executable
    3. Define that executable as a web browser in the registry
    4. Set that "web browser" as your default Windows browser

    I had never done this before, so I write this up for you,
    so that you too can define anything you want as your default
    web browser in Windows.

    My batch file simply appends to a text log & edits it for viewing:
    @echo off
    REM C:\path\to\dummybrowser.bat 20250819 revision 1.0
    set LOGFILE=C:\path\to\dummybrowser.log
    echo [%date% %time%] Attempted launch: %* >> %LOGFILE%
    start "" "C:\path\to\gvim.exe" "%LOGFILE%"
    exit

    Since Windows won't set the default web browser to a batch
    file, let's convert that dummybrowser.bat to dummybrowser.exe
    using any of a number of batch-to-executable converters.
    <https://github.com/l-urk/Bat-To-Exe-Converter-64-Bit/releases>
    <https://github.com/l-urk/Bat-To-Exe-Converter-64-Bit/releases/download/3.2/Bat_To_Exe_Converter_x64.exe>
    1. Open that "Bat To Exe Converter v3.2" executable.
    2. Select your .bat file using the folder icon.
    3. At the right, in Options, there is "Exe-Format" with these choices
    32-bit | Console (Visible)
    32-bit | Windows (Invisible)
    64-bit | Console (Visible)
    64-bit | Windows (Invisible) <== Use this to compile a batch file
    as a 64-bit GUI-style exe that runs silently with no console window.
    4. Click the "Convert" button to convert batch to exe.
    (Optional) Add an icon or version info.
    5. Choose your output path in the "Save as" field.
    C:\path\to\dummybrowser.exe

    But you still can't set the dummy browser yet as it's not registered.
    Win+I > Apps > Default apps > Web browser >
    That gives you the following four choices, none of which work yet.
    Choose default apps by file type
    Choose default apps by protocol
    Set defaults by app
    Recommended browser settings

    You first need to register your exe as a browser in the registry:
    HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet

    To do that, right-click "merge" this registry file:
    gvim C:\path\to\register_dummy_browser.reg

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DummyBrowser]
    @="Dummy Browser"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DummyBrowser\Capabilities]
    "ApplicationName"="Dummy Browser"
    "ApplicationDescription"="A privacy-preserving dummy browser"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DummyBrowser\Capabilities\FileAssociations]
    ".htm"="DummyBrowserHTML"
    ".html"="DummyBrowserHTML"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DummyBrowser\Capabilities\URLAssociations]
    "http"="DummyBrowserHTML"
    "https"="DummyBrowserHTML"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DummyBrowserHTML\shell\open\command]
    @="\"C:\\path\\to\\dummybrowser.exe\" \"%1\""

    [HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
    "Dummy Browser"="Software\\Clients\\StartMenuInternet\\DummyBrowser\\Capabilities"

    Now you can select the dummy browser as your default web browser.
    Win+I > Apps > Default apps > Web browser > dummybrowser.exe

    Voila!

    If any rogue process brings up the default browser, it is logged.
    And nothing else happens. How kewl is that!

    Please improve if you also need privacy in web browser sessions.


    --- MBSE BBS v1.1.2 (Linux-x86_64)
    * Origin: BWH Usenet Archive (https://usenet.blueworldho (3:633/280.2@fidonet)
  • From R.Wieser@3:633/280.2 to All on Wed Aug 20 03:47:47 2025
    Subject: Re: Tutorial: How to set up any batch script as your Windows default web browser

    Arlen,

    Tutorials are a bit more than just installation instructions.

    Next to a summing-up of all the up sides of a certain approach, they
    normally also contain a listing of the down sides of it - so the user can
    make an informed choice.

    In your case, changing the default browser will change the target of certain file-extensions. In your case /at least/ the .htm and .html ones.

    ....Meaning that just double-clicking an html file will not work anymore
    (gets caught by your dummy browser). :-((

    And it gets even worse when someone hand-edited some of those registry
    entries and now has to discover that those got overwritten. :-|


    [Tested only once. By me. Today. On Windows 10. For privacy.]

    A way for the user to test if everything was done/entered correctly would
    also be considered part of a tutorial (like how to get the default browser started). Now all the user can do is wait and hope. :-(


    Since Windows won't set the default web browser to a batch file,

    A question : how do you think the default web-browser picker knows what to check that "DummyBrowser.exe" name against ? I do not, in the "StartMenuInternet" registry branch, see any filepath to the executable itself.


    The *only* place your .REG file shows a name with a .EXE extension is here :

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DummyBrowserHTML\shell\open\command] @="\"C:\\path\\to\\dummybrowser.exe\" \"%1\""

    And what-do-you-know, I could, under my OS, have it point to a batch file
    and see it run when I double-click an html file.


    Bottom line : you're too focussed on the "everything works" result, and
    little eye for "what happens if it doesn't" or "can it be done simpler" and, rather important, "what are the drawbacks".

    Regards,
    Rudy Wieser



    --- MBSE BBS v1.1.2 (Linux-x86_64)
    * Origin: A noiseless patient Spider (3:633/280.2@fidonet)
  • From Marion@3:633/280.2 to All on Wed Aug 20 07:07:52 2025
    Subject: Re: Tutorial: How to set up any batch script as your Windows default web browser

    On Tue, 19 Aug 2025 19:47:47 +0200, R.Wieser wrote :


    A question : how do you think the default web-browser picker knows what to check that "DummyBrowser.exe" name against ? I do not, in the "StartMenuInternet" registry branch, see any filepath to the executable itself.

    The *only* place your .REG file shows a name with a .EXE extension is here :

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DummyBrowserHTML\shell\open\command]
    @="\"C:\\path\\to\\dummybrowser.exe\" \"%1\""

    Ah. My mistake. Thanks for pointing that confusion out.
    I wanted anyone to be able to set the dummy browser to a batch script.

    I had assumed people would modify anything starting with "C:".

    My fault. I should have better noted where the user needs to change paths. Thanks for letting me know. I'll be more clear below. Much appreciated.

    The hope was that people could just cut and paste (and set the paths).
    But I don't know what their paths would be.

    Thanks for testing it and pointing out that the "path to" might be confusing in the registry file where you need the real path.

    Everything that starts with "C:" needs to point to an actual file.
    Everything else should be left alone.

    Here's my actual batch file path:
    C:\sys\bat\dummybrowser.bat

    And here's the actual path to my executable file:
    C:\sys\exe\dummybrowser.exe

    Here's the actual full batch script:
    ===< cut here >===
    @echo off
    REM C:\sys\bat\dummybrowser.bat 20250819 revision 1.7
    set LOGFILE=C:\sys\log\dummybrowser.log
    echo [%date% %time%] Attempted launch: %* >> %LOGFILE%
    start "" "C:\app\editor\txt\vim\gvim.exe" "%LOGFILE%"
    exit
    ===< cut here >===

    And here's my actual registry file script:
    ===< cut here >===
    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DummyBrowser]
    @="Dummy Browser"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DummyBrowser\Capabilities]
    "ApplicationName"="Dummy Browser"
    "ApplicationDescription"="A privacy-preserving dummy browser"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DummyBrowser\Capabilities\FileAssociations]
    ".htm"="DummyBrowserHTML"
    ".html"="DummyBrowserHTML"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DummyBrowser\Capabilities\URLAssociations]
    "http"="DummyBrowserHTML"
    "https"="DummyBrowserHTML"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DummyBrowserHTML\shell\open\command] @="\"C:\\sys\\exe\\dummybrowser.exe\" \"%1\""

    [HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
    "Dummy Browser"="Software\\Clients\\StartMenuInternet\\DummyBrowser\\Capabilities"


    ===< cut here >=== (note the blank closing line!)


    Note that every path & file above that starts with "C:" must exist.
    Note that you create the EXE as from the BAT as described prior.
    Note that you can use any editor that you want (e.g., Notepad.exe).
    Note that wrapping may screw up the lines above due to the nntp servers.

    Let me know if I still missed something important.
    Sorry I wasn't more clear at first.
    This is the first time I've ever set my browser to be a batch log creator.

    --- MBSE BBS v1.1.2 (Linux-x86_64)
    * Origin: BWH Usenet Archive (https://usenet.blueworldho (3:633/280.2@fidonet)
  • From R.Wieser@3:633/280.2 to All on Wed Aug 20 17:09:37 2025
    Subject: Re: Tutorial: How to set up any batch script as your Windows default web browser

    Arlen,

    The *only* place your .REG file shows a name with a .EXE extension is
    here :

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DummyBrowserHTML\shell\open\command] >>> @="\"C:\\path\\to\\dummybrowser.exe\" \"%1\""

    Ah. My mistake. Thanks for pointing that confusion out.
    I wanted anyone to be able to set the dummy browser to a batch script.

    I had assumed people would modify anything starting with "C:".

    My fault. I should have better noted where the user needs to change paths. Thanks for letting me know. I'll be more clear below. Much appreciated.

    That was not my point. What is that instead of using "dummybrowser.EXE" you can also use "dummybrowser.BAT" and have it work. In other words, no need
    to convert the batch file to an executable (and that step can be removed)

    But yes, mentioning /exactly/ what needs to be changed (and into what) is needed too. Good catch.

    The same goes for your batchfile though. The path to the logfile and to the text-editor (viewer?) need to be changed too.


    Some other things I mentioned :

    [Tested only once. By me. Today. On Windows 10. For privacy.]

    A way for the user to test if everything was done/entered correctly
    would also be considered part of a tutorial

    How did you test that everything worked as it should ?

    Since Windows won't set the default web browser to a batch file,

    A question : how do you think the default web-browser picker knows
    what to check that "DummyBrowser.exe" name against ?

    Have you tested the above (not having an "DummyBrowser.exe" anywhere), and
    how did the default web browser picker respond ? If it still works ...

    ...Meaning that just double-clicking an html file will not work
    anymore (gets caught by your dummy browser). :-((

    Have you also checked that ? I'm running a bit older OS here, so its /possible/ it works diffent on W10.


    And something else : the term "default browser" has become a bit ambigue
    when MS started to force the use of its build-in Edge browser for everything OS related. Nowerdays the term "opening with the default browser" often
    means that Edge is used, ignoring the /users/ "default webbrowser" choice.

    Perhaps some clarification (to which one your tutorial is aimed at) would be in order

    And as a last remark: on my OS I can have no webbrowser installed, but still get one by using "explorer {url}". Yep, the *file* browser behaves like a webbrowser too. :-\ (and that one is hard to block ...)

    Regards,
    Rudy Wieser



    --- MBSE BBS v1.1.2 (Linux-x86_64)
    * Origin: A noiseless patient Spider (3:633/280.2@fidonet)
  • From wasbit@3:633/280.2 to All on Wed Aug 20 19:08:21 2025
    Subject: Re: Tutorial: How to set up any batch script as your Windows default
    web browser

    On 19/08/2025 22:07, Marion wrote:
    On Tue, 19 Aug 2025 19:47:47 +0200, R.Wieser wrote :


    A question : how do you think the default web-browser picker knows what to >> check that "DummyBrowser.exe" name against ? I do not, in the
    "StartMenuInternet" registry branch, see any filepath to the executable
    itself.

    The *only* place your .REG file shows a name with a .EXE extension is here : >>
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DummyBrowserHTML\shell\open\command] >>> @="\"C:\\path\\to\\dummybrowser.exe\" \"%1\""

    Ah. My mistake. Thanks for pointing that confusion out.
    I wanted anyone to be able to set the dummy browser to a batch script.

    I had assumed people would modify anything starting with "C:".

    My fault. I should have better noted where the user needs to change paths. Thanks for letting me know. I'll be more clear below. Much appreciated.

    The hope was that people could just cut and paste (and set the paths).
    But I don't know what their paths would be.


    You really must, especially in a tutorial, choose when to use 'cut &
    paste' & 'copy & paste'. :)


    Thanks for testing it and pointing out that the "path to" might be confusing in the registry file where you need the real path.

    Everything that starts with "C:" needs to point to an actual file.
    Everything else should be left alone.

    Here's my actual batch file path:
    C:\sys\bat\dummybrowser.bat

    And here's the actual path to my executable file:
    C:\sys\exe\dummybrowser.exe

    Here's the actual full batch script:
    ===< cut here >===
    @echo off
    REM C:\sys\bat\dummybrowser.bat 20250819 revision 1.7
    set LOGFILE=C:\sys\log\dummybrowser.log
    echo [%date% %time%] Attempted launch: %* >> %LOGFILE%
    start "" "C:\app\editor\txt\vim\gvim.exe" "%LOGFILE%"
    exit
    ===< cut here >===

    And here's my actual registry file script:
    ===< cut here >===
    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DummyBrowser]
    @="Dummy Browser"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DummyBrowser\Capabilities]
    "ApplicationName"="Dummy Browser"
    "ApplicationDescription"="A privacy-preserving dummy browser"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DummyBrowser\Capabilities\FileAssociations]
    ".htm"="DummyBrowserHTML"
    ".html"="DummyBrowserHTML"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\DummyBrowser\Capabilities\URLAssociations]
    "http"="DummyBrowserHTML"
    "https"="DummyBrowserHTML"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DummyBrowserHTML\shell\open\command] @="\"C:\\sys\\exe\\dummybrowser.exe\" \"%1\""

    [HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
    "Dummy Browser"="Software\\Clients\\StartMenuInternet\\DummyBrowser\\Capabilities"


    ===< cut here >=== (note the blank closing line!)


    Note that every path & file above that starts with "C:" must exist.
    Note that you create the EXE as from the BAT as described prior.
    Note that you can use any editor that you want (e.g., Notepad.exe).
    Note that wrapping may screw up the lines above due to the nntp servers.

    Let me know if I still missed something important.
    Sorry I wasn't more clear at first.
    This is the first time I've ever set my browser to be a batch log creator.




    --
    Regards
    wasbit

    --- MBSE BBS v1.1.2 (Linux-x86_64)
    * Origin: A noiseless patient Spider (3:633/280.2@fidonet)
  • From Marion@3:633/280.2 to All on Thu Aug 21 02:32:34 2025
    Subject: Re: Tutorial: How to set up any batch script as your Windows default web browser

    On Wed, 20 Aug 2025 10:08:21 +0100, wasbit wrote :

    The hope was that people could just cut and paste (and set the paths).
    But I don't know what their paths would be.


    You really must, especially in a tutorial, choose when to use 'cut &
    paste' & 'copy & paste'. :)

    Since I'm wired to be a purposefully helpful instructor, I hack out a lot
    of ad-hoc tutorials (perhaps thousands over the years), where on the XDA Developer's web site, they tell me something similar in that I should call
    them "Guides" (which is the keyword they prefer for such do-it things). :)

    Here's an example where I titled it a "tutorial" and they put the keyword "[Guide]" on it instead, where this guide/tutorial applies also to the PC.
    *[Guide] Tutorial*
    *How to manage (non-root) Android system packages from a PC*
    <https://xdaforums.com/t/guide-tutorial-how-to-manage-non-root-android-system-packages-from-a-pc-e-g-remove-install-google-discover-from-user-work-profiles.4726294>

    In fact, quite a few of my XDA tutorials apply equally well to the PC:
    *Tutorial:*
    *How to output Android system information to a text/pdf/html file*
    <https://xdaforums.com/t/tutorial-how-to-output-android-system-information-to-a-text-pdf-html-file.4737418/#post-90140743>

    To your point, I 'copied & pasted' those links above for your edification.
    *Tutorial:*
    *How to bidirectionally copy files for free between Android*
    *& any other platform over the local network (LAN) without Internet!*
    <https://xdaforums.com/t/tutorial-how-to-bidirectionally-copy-files-for-free-between-android-any-other-platform-over-the-local-network-lan-without-using-the-internet.4730873/post-90051188>

    You may not know that I'm a stickler for proper & correct language, where I
    do very much appreciate your admonition to use "copy" versus "cut" above.

    I love to learn from others, where I've learned a lot from you over time.
    Much like people unthinkingly say "I could care less", I wasn't cognizant
    of the delta between "copy & paste* versus *cut & paste* parlance.

    Cut & Paste:
    a. Removes the selected item from its original location
    b. Moves it to the new location
    c. Control+X followed by Control+V
    d. Moving files between folders or rearranging text in documents

    Copy & Paste:
    a. Keeps the original item in place
    b. Duplicates it to the new location
    c. Control+C followed by Control+V
    d. Reusing content or backing up files or quoting text

    I'm never afraid to admit when I'm wrong - so I'm happy you pointed this
    out to me as I would never have thought of it had you not kindly done so.

    Thank you very much as I do very much strive to speak/write clearly.

    REFERENCES:
    <https://pediaa.com/difference-between-cut-paste-and-copy-paste/>
    <https://www.digitalcitizen.life/what-copy-cut-and-paste-what-do-they-mean/>

    <https://easytechsolver.com/is-it-better-to-copy-and-paste-or-cut-and-paste/>

    --- MBSE BBS v1.1.2 (Linux-x86_64)
    * Origin: BWH Usenet Archive (https://usenet.blueworldho (3:633/280.2@fidonet)
  • From Marion@3:633/280.2 to All on Thu Aug 21 13:33:26 2025
    Subject: Re: Tutorial: How to set up any batch script as your Windows default web browser

    On Wed, 20 Aug 2025 09:09:37 +0200, R.Wieser wrote :

    My fault. I should have better noted where the user needs to change paths. >> Thanks for letting me know. I'll be more clear below. Much appreciated.

    That was not my point. What is that instead of using "dummybrowser.EXE" you can also use "dummybrowser.BAT" and have it work. In other words, no need to convert the batch file to an executable (and that step can be removed)

    But yes, mentioning /exactly/ what needs to be changed (and into what) is needed too. Good catch.

    The same goes for your batchfile though. The path to the logfile and to the text-editor (viewer?) need to be changed too.

    Ah, thanks for explaining what I was unaware of on being able to set a
    batch file as the "default browser", which I was unaware of until now.

    After checking up on Rudy's suggestions, it turns out that he's completely correct that Windows doesn't care whether the "browser" executable is
    something you wrote yourself, as long as it's a valid program file type
    that can be launched. While *.exe is the usual format for an application,
    it turns out Rudy is correct that lowly .bat (or .cmd) files can also be
    set as the default handler for http and https protocols.

    What fooled me was when we use the Win+I Settings > Apps > Default apps
    Gui, Windows will only let us choose registered applications, so *.bat
    files don't show up there.

    But as Rudy hinted at, if we manually change the file association for the URL:HyperText Transfer Protocol and URL:HyperText Transfer Protocol with Privacy protocol handlers in Control Panel > Default Programs > Associate a file type or protocol with a program, we can point the GUI straight to our batch file (or to cmd.exe /c "C:\path\to\dummybrowser.bat" "%1").

    So Rudy is right. I was wrong. Mea culpa. Lesson learned.
    Using Rudy's helpful suggestion, no bat-to-exe conversion is needed.

    There is still an advantage to the *.exe format as it will show up in app pickers like the default-browser list, and it hides the console window
    flash, so running the bat-to-exe makes the dummy browser look more like a
    "real app" to Windows and other software.

    But, functionally, as Rudy kindly pointed out, the batch file works the
    same whether it's .bat or .exe once we get the Windows OS to call it.

    There's also the added advantage that we can tweak the batch file at will,
    as we hone it to become our very own personal dummy browser catchment log.

    A way for the user to test if everything was done/entered correctly
    would also be considered part of a tutorial

    How did you test that everything worked as it should ?

    It worked on my system. I wrote up the steps. I posted them here.
    If someone paid me to write better tutorials, I'd be glad to do so! :)

    Since Windows won't set the default web browser to a batch file,

    A question : how do you think the default web-browser picker knows
    what to check that "DummyBrowser.exe" name against ?

    Have you tested the above (not having an "DummyBrowser.exe" anywhere), and how did the default web browser picker respond ? If it still works ...

    ...Meaning that just double-clicking an html file will not work
    anymore (gets caught by your dummy browser). :-((

    Have you also checked that ? I'm running a bit older OS here, so its /possible/ it works diffent on W10.

    If someone gave me free machines to test against, I'd be glad to test 'em.

    And something else : the term "default browser" has become a bit ambigue when MS started to force the use of its build-in Edge browser for everything OS related. Nowerdays the term "opening with the default browser" often means that Edge is used, ignoring the /users/ "default webbrowser" choice.

    Perhaps some clarification (to which one your tutorial is aimed at) would be in order

    And as a last remark: on my OS I can have no webbrowser installed, but still get one by using "explorer {url}". Yep, the *file* browser behaves like a webbrowser too. :-\ (and that one is hard to block ...)

    Funny story about "default" browsers today happened when I tried to access
    the Windows proxy settings (Win+I > Network & Internet > Proxy > Manual
    proxy settings) in a single button press.

    This was too many steps since that's 2 steps & I wanted it to be 1 step.
    Win+R > ms-settings:network-proxy

    So I experimented by rightclicking on the desktop to create a shortcut
    whose target was "ms-settings:network-proxy" (sans quotes) and whose name
    was proxy, where I had expected "proxy.lnk" but what I got was "proxy.url".

    Huh?

    When you doubleclick on proxy.url made using that shortcut method, you end
    up getting asked the first time what "browser" you want to use, where you
    get no choices other than a funny-looking 'App picker' window which has
    only one choice, which is the choice of the Windows' URL protocol handler.

    I never saw that before, even as I've been on Windows as long as anyone.

    What's actually happening is that when we create a shortcut pointing to ms-settings:network-proxy, Windows treats it as an Internet Shortcut (hence ..url), and not as a .lnk file (which is what I had expected).

    Since anything with .url gets passed through the "default browser" handler
    - even if it's pointing to a special ms-settings: URI, the first time I
    opened it, Windows thinks "Okay, this is a web link... better ask what
    brower app he wants to open it in" and gives me only one choice of app.

    Who knew that launching a ms-settings: link from a .url file sends it
    through Windows' URI protocol association system, which treats it like a
    web link until told otherwise. Not me. I never stop learning about Windows.

    Thanks for helping to improve our tribal knowledge on this Windows ng.

    --- MBSE BBS v1.1.2 (Linux-x86_64)
    * Origin: BWH Usenet Archive (https://usenet.blueworldho (3:633/280.2@fidonet)
  • From R.Wieser@3:633/280.2 to All on Thu Aug 21 17:49:27 2025
    Subject: Re: Tutorial: How to set up any batch script as your Windows default web browser

    Arlen,

    So Rudy is right. I was wrong. Mea culpa. Lesson learned.

    You, I nor anyone else are born with such knowledge. iow, no Mea Culpa
    needed, you just didn't know. I knew, and now you do too. :-)

    There is still an advantage to the *.exe format as it will
    show up in app pickers like the default-browser list,

    Something for the "up side" and "down side" list.

    and it hides the console window flash, so running the bat-to-exe
    makes the dummy browser look more like a "real app" to Windows
    and other software.

    Thats certainly something to consider. Though you could get rid of the command-prompt window flicker by starting the batch file thru "start /min {batch file}"

    On my ancient OS I would most likely chose to run a .VBS (VBScript) file instead.

    the batch file works the same whether it's .bat or .exe once
    we get the Windows OS to call it.

    There's also the added advantage that we can tweak the batch file
    at will,

    That was my thought too. :-)

    A way for the user to test if everything was done/entered
    correctly would also be considered part of a tutorial

    How did you test that everything worked as it should ?

    It worked on my system. I wrote up the steps. I posted them
    here.

    No, I mean: what did you do to get "the default web browser" to start ? By clicking an html file ? Something else ?

    .... but only too late I realized that I was thinking about the Edge brower (the one forced by the OS).

    Since Windows won't set the default web browser to a batch file,

    A question : how do you think the default web-browser picker knows
    what to check that "DummyBrowser.exe" name against ?

    Have you tested the above (not having an "DummyBrowser.exe" anywhere),
    and
    how did the default web browser picker respond ? If it still works ...

    ...Meaning that just double-clicking an html file will not work
    anymore (gets caught by your dummy browser). :-((

    Have you also checked that ? I'm running a bit older OS here, so its
    /possible/ it works diffent on W10.

    If someone gave me free machines to test against, I'd be glad to test 'em.

    I took it that as a given that what you put into your tutorial you first created it on your/a 'puter you have - and as such having a test environment under easy reach.

    So I experimented by rightclicking on the desktop to create a
    shortcut whose target was "ms-settings:network-proxy" (sans quotes)
    and whose name was proxy, where I had expected "proxy.lnk" but what
    I got was "proxy.url".

    Huh?

    :-) .LNK (shortcut) files are for "drive:\path\file" stuff. .URL files
    are for urls.

    .... And by URLs I also mean "file://...." URLs. :-)

    Since anything with .url gets passed through the "default browser"
    handler - even if it's pointing to a special ms-settings: URI,

    Not quite : the .URL "shortcut" is only the first step in launching the
    stored URL : The second step is to look at the URLs protocol (http(s):// file://, etc), and than /again/ look in the registry to grab the assigned program for it.


    it's pointing to a special ms-settings: URI,
    ....
    When you doubleclick on proxy.url made using that shortcut method,
    you end up getting asked the first time what "browser" you want to
    use,

    Thats the behaviour you get for any file-type the OS doesn't recognise,
    isn't it ?

    where you get no choices other than a funny-looking 'App picker'
    window which has only one choice, which is the choice of the
    Windows' URL protocol handler.

    I never saw that before, even as I've been on Windows as long as anyone.

    :-) Well yeah, normally you do not create such URL shortcut files with that content by hand.

    Its possible that the that specific URI is not supposed to be used from outside the browser, so no information about it is stored in the registry.

    Who knew that launching a ms-settings: link from a .url file
    sends it through Windows' URI protocol association system,
    which treats it like a web link until told otherwise.

    I did. :-P

    .... but only as a result of wanting to change the icon for a file:// URI (pointing into my 'puter instead of into the internet), and I only did a couple of years back.

    iow, I had a reason to look at it. Otherwise I would not have known either.

    Not me. I never stop learning about Windows.

    Same here.

    Thanks for helping to improve our tribal knowledge on this Windows ng.

    Nope. The information I posted was for *you*.

    Others are welcome to it too ofcourse, but thats just a side effect.

    Regards,
    Rudy Wieser



    --- MBSE BBS v1.1.2 (Linux-x86_64)
    * Origin: A noiseless patient Spider (3:633/280.2@fidonet)