1

For Windows 7 and above, I constantly ran into a situation like: go to THE_DIRECTORY and do something. Every time I have to copy THE_DIRECTORY and use Win+E to open an Explorer, and then paste the special string THE_DIRECTORY to the address box, and then press Enter key.

How do I add an item named "Open in Explorer" to right-click context-menu after I have selected some text? I have already searched HowToGeek, but without any luck. Could someone shed some light on how to do this?

1 Answer 1

0

Here is a basic example of a shell extension from the example in this thread.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\Open_in_Explorer]
"MUIVerb"="Open_in_Explorer_By_KNUCKLE_DRAGGER"
"icon"="Explorer.exe"
"Position"="Top"

[HKEY_CLASSES_ROOT\Directory\Background\shell\Open_in_Explorer\command]
@="cmd /c start /wait /b powershell -command \"Clear-Host;$CLIPBOARD = PowerShell -NoProfile -STA -Command {[reflection.assembly]::loadwithpartialname('PresentationCore') | Out-Null;[Windows.Clipboard]::GetText()};C:\\Windows\\Explorer.exe $CLIPBOARD\""
;

Still working on how to make the magic happen, I think powershell maybe has a [Windows.Clipboard]::GetText() method we can use.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .