From Newsgroup: alt.msdos.batch
Bill Powell <
bill@anarchists.org> wrote:
Typing Win+R requires two hands (at least for me to do it, it does).
On my QWERTY keyboard, only 1 hand is needed. Win and R keys are within
the span of my left hand. Left pinky and left index finger. Same hand.
Rightclicking on any screen to select a context menu item only needs
one.
Depends on WHAT you intended to right click upon. Content menu entries
can be dependent on the object on which you click. In File Explorer,
you'd want to add a right-click entry for folder/directory objects (HKEY_CLASSES_ROOT\Directory\Background\shell). explorer.exe is both
the File Explorer and desktop manager. Your desktop, however, is a
special folder that gets different context menu entries. Adding the
entry to the Directory\Background\shell might still work to get a
context menu entry when right-clicking on the desktop folder. In case
you happen to right-click on a file, you'd want to add a content menu
entry for file objects, but I'd have to hunt on how to do that for file objects. That might be under HKEY_CLASSES_ROOT\*\shell.
Rather than define a bunch of shell extensions under various object
types in the registry, I think Win+R (and, for me, using just 1 hand) is probably easier than trying to figure out why the Run entry doesn't show
in a particular object's context menu. Besides, if you don't like using
Win+R, there are plenty of key macro tools (e.g., Autohotkey, AutoIt)
that let you define your own hotkeys (be careful not to step on any
already defined that you rely on).
To make matters worse, on a typical dual-screen setup, the taskbar
is different for each screen (don't ask me why - ask Microsoft why).
I wasn't looking for a Windows taskbar solution, like adding a toolbar
with common shortcuts, or pinning the given explorer.exe command to the taskbar.
Did you right-click on the Taskbar, choose Settings, and enable the
"Show taskbar on all displays" option? If so, is the dependent option
"Show taskbar buttons on" set to "All taskbars"?
Just being able to rightclick, no matter where your mouse is, is nice.
The context menu varies depending on what type of object on which you right-clicked. You would need to add a context menu entry for both
directory and file objects for the Run entry to always appear. There
might be other objects types where you need to add the content menu
entry.
Hey! I didn't know that special secret command brings up the RUN box!
explorer.exe Shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}
How did you know that magical command?
Online search on "windows run box command line" which found:
https://www.digitalcitizen.life/run-window-windows-7-why-use-it-anymore/
That list is probably not exhaustive. There are also shell commands
that you enter, like shell:appsfolder, to open special folders. I saved
a list from some online article, but there are others, like:
https://www.tenforums.com/tutorials/3109-shell-commands-list-windows-10-a.html
I've used shell:appsfolder which makes it easy to create a shortcut (on
the desktop that you move to wherever else you want it) instead of
having to find the executable to define a new shortcut, and some apps
are addressed by their AppID instead of a program file name (and a
shortcut thus created won't have a path to the executable). If you use shell:desktop, you'll see the desktop is just another folder. Since I
use OneDrive which usurps several special profile folders, navigating
to, say, My Pictures is a pain since I have to remember to drill under
the OneDrive folder instead of directly under my profile folder, so I
use shell:my pictures (space included).
However, shell:<string> directives point to folders. They do not run
commands or initiate actions. So, there is no shell:run directive.
I was at this very moment writing a batch file to bring up the RUN box.
@echo off
REM: c:\batch\runbox.bat (brings up the RUN box GUI in Windows)
%comspec% /c "C:\Users\me\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools\Run.lnk"
exit
Then I was adding that batch file to the rightclick context menu.
1. Win+R > regedit
2. Computer\HKEY_CLASSES_ROOT\Directory\Background\shell\
3. Optionally save that as a registry favorite with the name of:
https://www.techspot.com/guides/1670-windows-right-click-menu/
4. Create a new key under shell... let's call it "runbox"
5. Create a new key under 'runbox' called "command"
6. Set the 'command' value to be the batch file that you want run
@Default=c:\batch\runbox.bat
But that requires me to forevermore maintain a runbox.bat batch file.
Doesn't that also open a command shell? Batch commands are interpreted
by the command interpreter which usually opens a console window.
I just now changed that last step to the command you just gave me!
6. Set the command value to be the exact command that you want run
@Default=explorer.exe Shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}
Which worked without needing to maintain a separate batch file!
I then exported that registry key to "runbox.reg" as shown below.
.... [ cut here for the start of runbox.reg ]....
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\runbox]
[HKEY_CLASSES_ROOT\Directory\Background\shell\runbox\command]
@="explorer.exe Shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}"
.... [ cut here for the end of runbox.reg ]....
That should work when you right-click on a folder of which the desktop
is one. However, it might not show in the context menu when you
right-click on a file object, or network object, or other object type.
Now anyone can add a "runbox" command to their rightclick context menus!
Thank you for making it even easier to bring up a RUN box in Windows
without having to type anything nor to maintain a separate batch file!
You're welcome. I'm old school, so typing is faster than mousing
around, and why Win+R is faster for me, especially since I only need one
hand, and my eyes don't have to wander through a context menu to find an
entry there. Different strokes for different folks.
--- Synchronet 3.21d-Linux NewsLink 1.2