How to add an item named "Open in Explorer" to right-click context-menu after I have selected some text?

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?

zionpi

Posted 2014-01-17T07:57:04.217

Reputation: 113

Answers

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.

Knuckle-Dragger

Posted 2014-01-17T07:57:04.217

Reputation: 1 817