Re: Can a Reginald Rexx exec add itself to the Explorer right-click menu?



On Sun, 15 Jul 2007 14:50:18 -0400, Brandon Cherry
<brandon@xxxxxxxxxxxxxxx> wrote:

LurfysMa wrote:
On Sun, 15 Jul 2007 01:10:57 -0400, Brandon Cherry
<brandon@xxxxxxxxxxxxxxx> wrote:

LurfysMa wrote:
Using Reginald Rexx, can I write an exec that will add itself to the
right-click menu in Windows Explorer and operate on the corresponding
file?

I might like to write some utilities such as making a backup copy of
the file, etc.

Sorry for the double post. I meant to ask about Reginald, not Regina.
I had been checking out the various offerings and got them mixed up.
Gender confusion.

--
Currently using Personal Rexx for Windows 3.50 from Quercus on Win XP
Though I personally use ooRexx, you can translate this example to work
with your interpreter.

Run regedit and create the following key structure:
HKEY_CLASSES_ROOT\*\shell\Test\command

I am using the catchall '*'.

Not sure what you mean by catchall. In my registry (both systems),
there is already a "HKEY_CLASSES_ROOT\*\shellex\...". The next level
contains 2 entries: "ContextMenuHandlers" & "PropertySheetHandlers".

How much of "HKEY_CLASSES_ROOT\*\shell\Test\command" is literal?

I was able to create "HKEY_CLASSES_ROOT\*\shell".

Now do I create "HKEY_CLASSES_ROOT\*\shell\xyz", where "xyz" is the
name of my exec?

Do I then create ""HKEY_CLASSES_ROOT\*\shell\xyz\command"?

And then I put the command line (I guess I can copy the Target field
from a shortcut properties)?

Generally, you would set it based on the
file extention ('.rex', '.cmd', '.bat', etc) and setup a class to be
invoked based off the extension...on second thought, read the link
posted below, way more information than I could cover in one post.

For more information than you can shake a stick at see:
<http://msdn2.microsoft.com/en-us/library/aa969383.aspx>

I'm not sure I am experienced enough with Windows to mess with the
Registry. I am worried about ending up with a machine that won't boot.
I would like to ask a few questions before I jump off this cliff ;-)

This is a smart move on your part, editing the registry can be
dangerous. I would recommend you take proper precautionary procedures
before engaging in such an endeavor. Exporting your registry before
making a change is always a good idea and gives you a backup plan once
the 'feckle matter hits the spinning blades'.

I have two machines. One running Win2K and one running WinXP.

I did run Regedit on both. Under HKEY_CLASSES_ROOT, they both have a
\shellex folder. If I open that up, I see entries for the programs
that I already have that appear in the Explorer right-click menu
(WinZip, SnagIt, Beyond Compare, and Carbonite).

But neither has a \shell. Am I to create a new folder? How is \shell
different from \shellex?

The difference in creating a COM object (wrap it in a DLL like Jeff Glat
mentioned) or invoking the command line when the verb is selected.

Set the default value for the 'command' subkey to:
"C:\Program Files\ooRexx\rexx.exe" "c:\test.rex" %1

How do I do that?

After you create the 'command' subkey, click on it (regedit will show
the currently selected key in the status bar in the lower left) and on
the right hand side you should see a string value called '(Default)'
with the value set to nothing. Double-click on it to set the value to
the above (of course you will want to execute your rexx interpreter so
change that part).

Well, I closed my eyes and crossed my fingers and toes, and jumped.

It actually seems to work. And the system still runs. I haven't dared
a reboot yet. ;-)

I tried changing a few things and it looks like the text that will
appear in the right-click menu is the text between "\shell\" and
"\command", right?

Do I need to create a key for each exec I want to appear?


There is one odd side effect. Right after my new entry in te
right-click menu, there are now two more "Edit" and "Print" that I am
99% sure weren't there before. Edit invokes Notepad. Print invokes
Notepad and then Print.

--
Currently using Personal Rexx for Windows 3.50 from Quercus on Win XP
.



Relevant Pages

  • Re: System restore -- or reload factory software ?
    ... That's got something to do with Windows 7, ... faster, etc., by doing anything with the registry. ... backup to occur or not, to verify that was the problem. ... optical drives, ...
    (soc.retirement)
  • Re: Fix corrupt NTFS partition?
    ... If you rely exclusively on the ERUNT registry backup utility, then, if you have not already done so, I would advise you to look into where ERUNT saves the registry files and it's advice on the differing methods of restoring them. ... This is important for one BIG reason: it's all very well to rely on ERUNT's own restore exe, but, it can only be used if the registry is still bootable as it runs only under Windows. ...
    (microsoft.public.windowsxp.general)
  • Re: lost details
    ... There is a way to backup the registry that comes native in Windows XP. ... Registry Backup and Restore for Windows NT/2000/2003/XP ...
    (microsoft.public.windowsxp.general)
  • RE: Backup and other Questions
    ... computerized for windows xp pro. ... The registry Event logs,System files, otherwise known as the registry. ... A volume is a (hard disk, or cdrw drive or dvd drive ect,, ... Now regisry items you backup include application regisry items too,(your ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: lost details
    ... Registry Backup and Restore for Windows NT/2000/2003/XP ...
    (microsoft.public.windowsxp.general)