Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Background Menu

Nov
247
2
Here is an interesting registry setting you might want to squeeze into 4nt etc. This is on my windows 2000 box, the TCMD is that ancient gui prompt similar to TCMDOS2. I think it was called tcmd32. My windows 2000 box is stuck on 8.01/ini, because i did not like the 8.02 icons. This is actually derived from some proggie cmdhere or something like that.

[HKEY_CLASSES_ROOT\Directory\Background\shell\tcmdhere]
TCMD Here

[HKEY_CLASSES_ROOT\Directory\Background\shell\tcmdhere\command]
@="tcmd.exe /k *cdd %1"

What this does, is when you click on an open folder's background, you get a popup menu. Might be a useful addon for your 'install tcc thing'.
 
Here is an interesting registry setting you might want to squeeze into 4nt etc. This is on my windows 2000 box, the TCMD is that ancient gui prompt similar to TCMDOS2. I think it was called tcmd32. My windows 2000 box is stuck on 8.01/ini, because i did not like the 8.02 icons. This is actually derived from some proggie cmdhere or something like that.

[HKEY_CLASSES_ROOT\Directory\Background\shell\tcmdhere]
TCMD Here

[HKEY_CLASSES_ROOT\Directory\Background\shell\tcmdhere\command]
@="tcmd.exe /k *cdd %1"

What this does, is when you click on an open folder's background, you get a popup menu. Might be a useful addon for your 'install tcc thing'.
w_kreiger, are you saying you have seen that work? In my experience, that works if you have a "proggie" (a context menu handler DLL) but not via the ordinary shell\verb\command mechanism.
 
I had always thought this didn't work for Directory\Background. But I have always tried it using "%L". It does, in fact, work if I use "%V" (emulating a Win7 action for CMD which you see only if you Shift-RightClick). This, below, simply works (without Shift). It gives "17Here" when you right-click on the background of an Explorer window AND ALSO (I like this) when you right-click on the desktop. Something like it would be a handsome addition to *HERE.BTM.

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\TCC17]
@="17Here"

[HKEY_CLASSES_ROOT\Directory\Background\shell\TCC17\command]
@="g:\\tc17\\tcc.exe /k cdd \"%V\""
 
As a matter of fact, no command or arguments at all are needed for a "TCCHere" to work with Directory\Background (including the desktop). This works fine.
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\TCC17]
@="17Here"

[HKEY_CLASSES_ROOT\Directory\Background\shell\TCC17\command]
@="g:\\tc17\\tcc.exe"
 
4nt is handled by a DLL '4nthere.dll', so you don't see the registry key for it. I found the registry key in the setup-superimpose directory.

tcmd was a jp product tcmd32.exe which i 'integrated' with 4nt, (one does this ever since tcmd came out). It's not handled by 4nthere.dll, so it has a registry thing which is what i quoted. console2 was the other program in that key. Windows 8.1 has it for cmd.exe.
 
4nt is handled by a DLL '4nthere.dll', so you don't see the registry key for it. I found the registry key in the setup-superimpose directory.

tcmd was a jp product tcmd32.exe which i 'integrated' with 4nt, (one does this ever since tcmd came out). It's not handled by 4nthere.dll, so it has a registry thing which is what i quoted. console2 was the other program in that key. Windows 8.1 has it for cmd.exe.
The only 4nthere.dll I know of is one I wrote (actually, I hacked a KB example) many, many years ago. I called a little attention to it but it never got much circulation. I still use it in 32-but Windows 7. I am/was not looking forward to trying to bring it into the 64-bit world. I only used it because I thought directory\background couldn't be done with the usual shell\action\command mechanism. I was pleased to discover that I was wrong and 4nthere.dll (newer ones are tcchere.dll) may soon be forgotten.
 
It works with tcc v16 x64 on windows '8.1" 4nt has never been on this box.

But thank you for 4nthere, it solve many an hour's back and forth.
 
FWIW, below (and attached) is TCCHereEx.btm. It differs from TCCHere.btm in that (1) it also affects "Directory\Background" (which includes the desktop) and (2) it gives the user the opportunity to change the text which appears on the context menu. Comments and improvements are welcome.
Code:
@echo off
rem  TCCHereEx.btm ... add "TCC prompt here" entry to Explorer context menu

setlocal
on break goto outofhere
on errormsg goto outofhere

set text=TCC prompt here

iff "%_elevated" NE "1" then
  echo This BTM file must be run in an elevated session.
  goto outofhere
endiff

echo ^r^nDo you want to add a "%text" entry to the Windows Explorer
echo context (right click) menus for directories, drives, and
echos directory backgrounds [Y/N] ?
inkey /k"yn[enter]" %%var

if "%var" ne "y" goto outofhere

echo ^r^nThe text "%text" will appear in the context menu.
echos Do you want to change that text? [Y/N]
inkey /k"yn[enter]" %%var

if "%var" eq "y" eset text

do key in /L Directory Drive Directory\Background
   iff   %@regcreate["HKCR\%key\Shell\TCC\command"] != 0 .or. ^
     %@regset["HKCR\%key\Shell\TCC\",REG_SZ,%text] != 0 .or. ^
     %@regset["HKCR\%key\Shell\TCC\command\",REG_SZ,"%_cmdspec" %@if["%key" != "Directory\Background",/k *cdd "%%%%L",]] != 0 ^
   then
     goto outofhere
   endiff
enddo

echo The Explorer context menus have been updated.
quit

:outofhere
echo The registry was not updated.
 

Attachments

  • TCCHereEx.btm
    1.1 KB · Views: 217
You could do something like run this:

Code:
set text =%_Cmdproc Prompt Here
:textloop
echo TCCHere will now create context menu entries to launch %_cmdproc
echo on the drives and folder icons, and on the background of an open folder.
echo.
echo Edit the text or press [enter] to accept it.
echo To cancel this action, press [esc] and then [enter].
set text_ = %text
eset %text
if "%text%"=="" then goto :outofhere
if not "%text"=="%etext_%" goto :textloop
:: fallthrough



This will fall out if the text is the same as the text_, on any number of edit attempts.
 
Last edited:

Similar threads

Back
Top