Sign in to follow this  
Followers 0
leuce

Add/customize Explorer folder toolbar

2 posts in this topic

G'day everyone

I'd like to customize my Explorer folders. How can I do this? Editing the registry or something? What I would like, is to have certain AutoIt scripts added as buttons (icons) to a custom toolbar or the existing toolbar in folders in Windows Explorer. Currently, there is a "Customize" feature but you can only add buttons that Microsoft had deemed good enough to add -- you can't add your own. Does anyone have any links to sites that does this? Googling for it only yields help files on how to customize using the limited set of buttons provided by Microsoft.

Why do I want this? Well, one big reason is the ability to open a CMD window relative to the current window. I'm sure I can do it by adding an AutoIt script to my QuickLaunch bar, but it would be cooler and more useful to add it to the folder window itself.

Using Windows XP Pro.

Thanks

Samuel

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

I know it's not the same as a button , but can't you just add a reg entry and right click any directory in windows and select cmd prompt from a context menu..

No scripts loading needed to do it and no navigating to a button at the top of a window , just right click on a directory and away you go.

Here's an autoit script to add registry entries to enable context menu Command Prompt option on any drive or folder if the entries are not already in the registry.

If the registry already contains the entries then the script will remove them instead.

I have used/tested it in english xp pro sp2 and had no problems but...

Be warned .. Back up your registry before trying the script!

If Not RegRead("HKEY_CLASSES_ROOT\Directory\shell\cmd", "") Then
    RegWrite("HKEY_CLASSES_ROOT\Directory\shell\cmd", "", "REG_SZ", '@%SystemRoot%\system32\shell32.dll,-22022"')
    RegWrite("HKEY_CLASSES_ROOT\Directory\shell\cmd\command", "", "REG_EXPAND_SZ", 'cmd.exe /k cd "%L"')
    RegWrite("HKEY_CLASSES_ROOT\Drive\shell\cmd", "", "REG_SZ", '@%SystemRoot%\system32\shell32.dll,-22022"')
    RegWrite("HKEY_CLASSES_ROOT\Drive\shell\cmd\command", "", "REG_EXPAND_SZ", 'cmd.exe /k cd "%L"')
ElseIf RegRead("HKEY_CLASSES_ROOT\Directory\shell\cmd", "") Then
    RegDelete("HKEY_CLASSES_ROOT\Directory\shell\cmd")
    RegDelete("HKEY_CLASSES_ROOT\Drive\shell\cmd")
EndIf

Or here's the registry entries as exported from my registry before converting them to an autoit script format

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\cmd]
@="@%SystemRoot%\\system32\\shell32.dll,-22022\""

[HKEY_CLASSES_ROOT\Directory\shell\cmd\command]
@=hex(2):63,00,6d,00,64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,6b,00,20,00,63,\
  00,64,00,20,00,22,00,25,00,4c,00,22,00,00,00

[HKEY_CLASSES_ROOT\Drive\shell\cmd]
@="@%SystemRoot%\\system32\\shell32.dll,-22022\""

[HKEY_CLASSES_ROOT\Drive\shell\cmd\command]
@=hex(2):63,00,6d,00,64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,6b,00,20,00,63,\
  00,64,00,20,00,22,00,25,00,4c,00,22,00,00,00

Cheers

Edited by smashly

Share this post


Link to post
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
Sign in to follow this  
Followers 0