Jump to content

Add 'Back' to context menu in explorer.exe


Recommended Posts


If you can settle with having on the context menus that appear when you right-click a file/folder then you could use a reg tweak like in my file below (don't worry only batch & reg files).

One downside to this approach is that you need to use a command argument.. but the good news is sometimes you can cheat. What I did was write a script that uses the hotkeys (which I think back in explorer is Alt+{Left Arrow}) and call my script as the argument (well i gave it an app-path then called it that way...)

Edit: I doublechecked and... I was right :D -- Alt+{Left Arrow} is the keyboard shortcut for back. So.. if you used Auto It and wrote a script with the following code.. you could compile the script. Then download my select_all.zip tweak, and replace all the "select all" stuff with "back" stuff. BUT THIS WILL **NOT** WORK ON FOLDER BACKGROUND CONTEXT; ONLY FOLDER/FILE CONTEXT.

Code for an autoit script for "Back"

Send("!{LEFT}")

; *OR* alternatively AutoIt provides a command for this:
; Send("{BROWSER_BACK}")

ps - I tested the script both ways and they work fine under xp home. also if you use the app. paths for yours, you'll have to re-export with the corrct value because mine shows the path "%windir%\system32\select_all.exe" IN HEX. But you could probably skip that and just use the whole path in the menu command.

but AFAIK, if you want to be able to add something to the context menu that appears when you right-click a folder's background you need to do some extra work (like using DLLs and registering a CLSID). now if i'm wrong about this anybody please free to correct me (and please demonstrate with examples) Or if anybody wants to show me the "right" way to do it, I'd love to get a pm with some example c++/vb/whatever. :whistle: .

Edited by spiritpyre
Link to comment
Share on other sites

@spiritpyre

I tried Send("!{LEFT}") and I tried Send("{BROWSER_BACK}")

Said invalid command or something when trying to test the exe's that I created from trying each of them in a aut. I tried to decompile your selectall.exe; it said it could not find the aut script. I'm not sure what I'm doing wrong. Thanks

Link to comment
Share on other sites

I decided to update things a bit and while i was at it I threw together one you should be able to use. let me know if you have problems getting it to run/appear and i'll look at it again but I tested both the .exe alone and via context menu and both ways work fine on my end.

Updated: select_all.zip

New: browserback.zip

Edit: Just thought I'd mention that originally you needed to edit the .reg file by removing the comment from the first line, but I just decided to take that out so there's less overhead. (aka you no longer need to edit anything just use that batch files)

Edited by spiritpyre
Link to comment
Share on other sites

@spiritpyre

Thank you for your help with this. Sorry for the prolonged thanks. I have been researching a little to add into my post how to add something to the context menu when right clicking in the blank area of an explorer window. I have not found out yet. I emailed the staff at eusing.com about how they did it in their program Select Folder Express. I have not heard a response from them yet. I did run across this: http://www.msfn.org/board/index.php?showtopic=47603 , but I did not realize if anything was different from this thread. I am still wondering how to do it for the blank area too. Thank you again :D

Link to comment
Share on other sites

here's what I know on that subject:

from msdn (scroll down to the last table and look just below the table at the first entry under "notes"). From what I understand from the rest of the article (and a few others from msdn), I would need to register a dll under HKCR\CLSID and point an entry in the HKCR\Directory\Background key to the HKCR\CLSID\{SID for dll} to be able to do this. If I'm wrong, and its actually easier... well, I'd rather be wrong and it be easier but who knows.

I've been planning on trying out these articles and seeing if I can't figure it out: The Complete id***'s Guide to Writing Shell Extensions but I haven't really had much time lately except a few hours late each night and so far I've been pretty burned out by then.

Edited by spiritpyre
Link to comment
Share on other sites

  • 1 month later...

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...