gvim C:\path\to\register_dummy_browser.reg
[Tested only once. By me. Today. On Windows 10. For privacy.]
Since Windows won't set the default web browser to a batch file,
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DummyBrowserHTML\shell\open\command] @="\"C:\\path\\to\\dummybrowser.exe\" \"%1\""
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\""
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.
[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
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 ?
...Meaning that just double-clicking an html file will not work
anymore (gets caught by your dummy 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.
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'. :)
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.
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 ...)
So Rudy is right. I was wrong. Mea culpa. Lesson learned.
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.
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,
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.
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.
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?
Since anything with .url gets passed through the "default browser"
handler - even if it's pointing to a special ms-settings: URI,
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,
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.
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.
Sysop: | Tetrazocine |
---|---|
Location: | Melbourne, VIC, Australia |
Users: | 11 |
Nodes: | 8 (0 / 8) |
Uptime: | 49:21:02 |
Calls: | 166 |
Files: | 21,502 |
Messages: | 77,716 |