Jump to content

Add Command in Context Menu?


kbdavis

Recommended Posts

After a little research I have figured out that the program I was trying to recall was/is called Fast Explorer by Alex Yakovlev and Serge Kolesnikov.

It was hosted at http://thesoftpro.tripod.com/downloads/fe/index.htm but appears to have vanished.

I located a page in Wayback here ... http://web.archive.org/web/20100125014241/http://thesoftpro.tripod.com/downloads/fe/index.htm

The last dated page seems to be 2008-08-24 but I have all the files and pages saved from their website as of 2010-01-26. Not sure when they went offline though. Screencap of the top of the first page ...

fastexplorerwebpagep1.jpg

If you want to see the middle and bottom of that page open these images: part-2, part-3 ( it was too large for a single bitmap ).

P.S. I still cannot find the MSFN thread where we had discussed it.

EDIT: typo

Edited by CharlotteTheHarlot
Link to comment
Share on other sites


Just wanted to mention a short reference I found, by Raymond Chen on his blog ...

What is the difference between the Folder and Directory (and other special) progids? ( 2007-08-02 )

When you're installing your shell extension, you need to know which progid to hang it off of inside HKEY_CLASSES_ROOT. We'll start with the title question and then move on to other predefined (but perhaps not well-known) progids.

  • "Folder" is the progid for any shell folder. It could be a virtual folder (like Control Panel) or a file system folder (like C:\WINDOWS).
  • "Directory" is the progid for file system folders. This is a subset of "Folder".
  • "*" is the progid for all files. Doesn't matter what the extension is.
  • "." (that's a single period) is the progid for files without any extension.
  • "AllFileSystemObjects" is the union of "*" and "Directory". It is the progid for all files and for file system directories.

The statement: "Directory" is a subset of "Folder" seems to verify something I suggested earlier in this thread about slight differences in what handlers show up when right-clicking either of those two types. I just need to confirm the details of HIDDEN and/or SYSTEM folders being excluded from "Directory".

Link to comment
Share on other sites

I was able to add Delete It to the context menu where Open and Edit are located.

Thank you , I used * Reg key to add Delete it :thumbup

post-5386-0-85651200-1364496121_thumb.pn

How To Add

1:\ Copy Application to Windows or Windows\Systen32, I used the Window folder

2:\ Open Reg Edit Expand HKEY_CLASSES_ROOT\*

3:\ Add a Key inside the Registry Shell Folder , this is also the name on the context menu Example Delete It

4:\ Create a key in inside of step 3 called command and fill in the Default with Example C:\Windows\DeleteIt.exe "%1"

Reg Key Delete It Added

post-5386-0-84069500-1364496292_thumb.pn

Link to comment
Share on other sites

  • 2 weeks later...

Anyone interested in INF format? You can mount the WIM and apply this and have 7 "remember" the settings I suppose.

The line for directory contents is this:

HKCR,"Folder\Shell\List Contents to text file\command",,,"%11%\cmd.exe /C DIR ""%1"" /B /O /S>""%1""""_contents list.txt"""

It makes a printable file. My INF below adds a few useful items I use all the time in 7 like using the contig utility for defragging and remember those instructions all over the 'net to make a "god mode" icon on the desktop? That's in here too but I call it 'expanded control panel' (you'll see what I mean). Edit it as you will....



[version]
Signature="$Windows NT$"

[DefaultInstall]
AddReg = ContextMenu

[ContextMenu]

; Add "command-prompt-here" functionality when right-clicking a directory
HKCR,"Drive\Shell\Command Prompt Here\command",,,"%11%\cmd.exe /k cd ""%1"""
HKCR,"Directory\Shell\Command Prompt Here\command",,,"%11%\cmd.exe /k cd ""%1"""

;
HKCR,"*\shell\runas",,,"Take Ownership"
HKCR,"*\shell\runas","NoWorkingDirectory",,""
HKCR,"*\shell\runas\command",,,"cmd.exe /c takeown /f ""%1"" && icacls ""%1"" /grant administrators:F"
HKCR,"*\shell\runas\command","IsolatedCommand",,"cmd.exe /c takeown /f ""%1"" && icacls ""%1"" /grant administrators:F"
HKCR,"Directory\shell\runas",,,"Take Ownership"
HKCR,"Directory\shell\runas","NoWorkingDirectory",,""
HKCR,"Directory\shell\runas\command",,,"cmd.exe /c takeown /f ""%1"" /r /d y && icacls ""%1"" /grant administrators:F /t"
HKCR,"Directory\shell\runas\command","IsolatedCommand",,"cmd.exe /c takeown /f ""%1"" /r /d y && icacls ""%1"" /grant administrators:F /t"

; add advanced system properties to mycomp
HKCR,"CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\AdvSysProp",,0x00020000,"Advanced System Properties"
HKCR,"CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\AdvSysProp\command",,0x00020000,"control sysdm.cpl"

; add device manager to mycomp
HKCR,"CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Devices",,0x00020000,"Device Manager"
HKCR,"CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Devices","SuppressionPolicy",0x00010001,3c,00,00,40
HKCR,"CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Devices\command",,0x00020000,"%windir%\system32\mmc.exe /s %SystemRoot%\system32\devmgmt.msc /s"

; add the mega-control panel on mycomp
HKCR,"CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\ExpCPL",,0x00020000,"Expanded Control Panel"
HKCR,"CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\ExpCPL\command",,0x00020000,"%windir%\explorer.exe shell:::{ED7BA470-8E54-465E-825C-99712043E01C}"
; unused alternate for the exact same thing
;HKLM,"SOFTWARE\Classes\CLSID\{20d04fe0-3aea-1069-a2d8-08002b30309d}\shell\Expanded Control Panel\command",,,"%windir%\explorer.exe shell:::{ED7BA470-8E54-465E-825C-99712043E01C}"

HKCR,"Folder\Shell\List Contents to text file\command",,,"%11%\cmd.exe /C DIR ""%1"" /B /O /S>""%1""""_contents list.txt"""

; contig
HKCU,"Software\Sysinternals\C","EulaAccepted",0x00010001,01,00,00,00
HKCR,"Directory\shell\contig","",0x00020000,"Defrag Folder with Contig"
HKCR,"Directory\shell\contig\command","",0x00020000,"%windir%\system32\contig.exe ""%L\*.*"" -v -s"

Link to comment
Share on other sites

  • 1 month later...

to add command to context menu in cascade (whit sub menu) for windows 7 and windows 8 from reg file

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Folder\shell\my index]

"MUIVerb"="my index name"

"SubCommands"="my prog 1;my prog 2;|;comprimi in 7z"

"icon"="C:\\Program Files\\my prog\\prog.exe, 0"

"Position"=-

[HKEY_CLASSES_ROOT\*\shell\my index]

"MUIVerb"="my index name"

"SubCommands"="my prog 1;my prog 2;|;comprimi in 7z"

"icon"="C:\\Program Files\\my prog\\prog.exe, 0"

"Position"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\my prog 1]

@=my prog 1"

"icon"="imageres.dll,109"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\my prog 1\command]

@="\"C:\\Program Files\\my prog\\prog.bat\" \"%1\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\my prog 2]

@="my prog 2"

"icon"="imageres.dll,109"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\my prog 2\command]

@="\"C:\\Program Files\\my prog 2\\my prog 2.exe\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\comprimi in 7z]

@="comprimi in 7z"

"Icon"="C:\\Progra~1\\7-Zip\\7zG.exe, 0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\comprimi in 7z\command]

@="\"C:\\Progra~1\\7-Zip\\7zg.exe\" a -t7z -mx=9 \"%1\".7z -oa \"%1\\*\""

;======================================

in context menu add 3 voice in cascade my index>(prog 1 prog2 comprimi in 7z) to max 20 voice in cascade menu

[HKEY_CLASSES_ROOT\Folder\shell\my index]============ all folder

[HKEY_CLASSES_ROOT\*\shell\my index]=============== all files

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\my prog] === desktop

to wont use separator in voice use |

"SubCommands"="my prog 1;|;my prog 2;|;comprimi in 7z"

no separator in voice d'ont use |

"SubCommands"="my prog 1;my prog 2;comprimi in 7z"

position menu in context menu use botton top and midle

"Position"="Bottom"

"Position"="Top"

"Position"=-

Edited by odar
Link to comment
Share on other sites

  • 1 year later...

I stumbled upon this post after trying to follow the instructions on Microsoft Support site - http://support.microsoft.com/kb/321379. The context menu was added upon running the reg file and I could even see the directory content in a notepad document for 2 seconds before it disappeared like a snapchat.

 

The alternate bat file code offered here by CharlotteTheHarlot worked well. Thanks much!

 

If someone can improve and save the txt file inside the same directory we are printing with this bat file, it will save future ‘where was this file saved to’ and it will not cause any problems of overwriting the same file when trying to print the content of multiple directories.

 

exit15

Link to comment
Share on other sites

If someone can improve and save the txt file inside the same directory we are printing with this bat file, it will save future ‘where was this file saved to’ and it will not cause any problems of overwriting the same file when trying to print the content of multiple directories.

You mean this one?

dir %1\*.* /ogn /-p > C:\Temp\Listing.txtnotepad.exe /p C:\Temp\Listing.txtcls

Try with:

@ECHO OFFDIR %1\*.* /ogn /-p > %1\Listing.txt notepad.exe /p %1\Listing.txt 

This should save the "Listing.txt" file to the same directory which was passed as a parameter to the batch, is this what you want? :unsure:

I would personally find more "correct" this version:

@ECHO OFFSETLOCAL ENABLEEXTENSIONSDIR "%~1\*.*" /ogn /-p > "%~1\Listing.txt"notepad.exe /p "%~1\Listing.txt"

but the result should be the same.

 

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

This one worked like a charm -- thanks (Fixing a small typo - ECHO OFF)

 

@ECHO OFFSETLOCAL ENABLEEXTENSIONSDIR "%~1\*.*" /ogn /-p > "%~1\Listing.txt"notepad.exe /p "%~1\Listing.txt"

exit15

Link to comment
Share on other sites

OMG, I went back to the office today and the printer started shooting all of my Listing.txt files from yesterday. What a waste. I did not mean for it to actually print, I just wanted to create the text file with the list of the files within the selected directory so that I can later manipulate in excel or access.

So here's the code: what it currently does is to create a txt file within the selected directory, this file Listing.txt has the names of all the files contained in that directory; it then sends this file to the printer. I want to stop sending the file to the printer.  – help me save some trees.

 

Printdir.dat

@ECHO OFFSETLOCAL ENABLEEXTENSIONSDIR "%~1\*.*" /ogn /-p > "%~1\Listing.txt"notepad.exe /p "%~1\Listing.txt"

PrintDirectoryListing.reg

Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Directory\Shell]@="none"[HKEY_CLASSES_ROOT\Directory\Shell\Print_Directory_Listing]@="Print Directory Listing"[HKEY_CLASSES_ROOT\Directory\shell\Print_Directory_Listing\command]@="Printdir.bat \"%1\""[HKEY_CLASSES_ROOT\SOFTWARE\Classes\Directory]"BrowserFlags"=dword:00000008[HKEY_CLASSES_ROOT\SOFTWARE\Classes\Directory\shell\Print_Directory_Listing]@="Print Directory Listing"[HKEY_CLASSES_ROOT\SOFTWARE\Classes\Directory\shell\Print_Directory_Listing\command]@="Printdir.bat \"%1\""[HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\AttachmentExecute\{0002DF01-0000-0000-C000-000000000046}]@=""[HKEY_CLASSES_ROOT\SOFTWARE\Classes\Directory]"EditFlags"="000001d2"

exit15

Link to comment
Share on other sites

Sure :).

If you invoke notepad with the /p switch, it will

1) open the file (but NOT display it on screen)

2) send it as is to the printer

3) close the file and terminate the running notepad

 

http://www.robvanderwoude.com/notepad.php

 

Just remove the /p from :

notepad.exe /p "%~1\Listing.txt"

 

Or remove the whole line above from the batch if you don't want the file to be opened in notepad.

 

Sorry for your paper (and for the trees). :(

 

jaclaz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...