How to add Console2 context menu entries in Windows

If you ever use the command line in Windows, you need to download Console2 immediately.

The first thing I noticed after installing it, however, is that it doesn’t add any context menu entries. I had to do quite a bit of research to come up with this registry hack:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\Console2]
@="Open Console2 Here"
[HKEY_CLASSES_ROOT\Directory\shell\Console2\command]
@="C:\\Console2\\Console.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\Console2]
@="Open Console2 Here"
[HKEY_CLASSES_ROOT\Directory\Background\shell\Console2\command]
@="C:\\Console2\\Console.exe"

If you want to copy and paste the text above into a .reg file, make sure the encoding is set to UCS-2 Little Endian before you try to import it into the registry.

EDIT 4/14/2015: It appears that Console2 is currently dormant. One alternative I’ve found is ConsoleZ, which is a fork of Console2. You can find it here: https://github.com/cbucher/console.

Then, use this script to create context menu entries:

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\directory\shell\ConsoleZ]
@="Open ConsoleZ here"
[HKEY_CURRENT_USER\Software\Classes\directory\shell\ConsoleZ\command]
@="C:\\Users\\Dave\\AppData\\Local\\ConsoleZ\\Console.exe -d \"%V\""
[HKEY_CURRENT_USER\Software\Classes\directory\background\shell\ConsoleZ]
@="Open ConsoleZ here"
[HKEY_CURRENT_USER\Software\Classes\directory\background\shell\ConsoleZ\command]
@="C:\\Users\\Dave\\AppData\\Local\\ConsoleZ\\Console.exe -d \"%V\""

Update the path as appropriate.

Advertisements

4 thoughts on “How to add Console2 context menu entries in Windows

  1. Fabian

    Hi

    I installed ConsoleZ via chocolatey. I used the following code to add the open with command to the right click “actual working directory” menu. Not the folder menu:

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\Directory\shell\Console] @=”Open Console Here”

    [HKEY_CLASSES_ROOT\Directory\shell\Console\command] @=”\”C:\ProgramData\Chocolatey\bin\Console.exe” -d \”%V\””

    [HKEY_CLASSES_ROOT\Directory\Background\shell\Console] @=”Open Console Here”

    [HKEY_CLASSES_ROOT\Directory\Background\shell\Console\command] @=”\”C:\ProgramData\Chocolatey\bin\Console.exe” -d \”%V\””
    The menu is updated, but when i try to right click it tells me:

    “Der Datei ist kein Programm zum Ausführen dieser Aktion zugeordnet. Installieren Sie ein entsprechendes Programm, oder erstellen Sie in der Systemsteuerung unter Standardprogramme eine Zuordnung, wenn bereits ein Programm installiert ist.”

    Which roughly translates to. cant find the Program to execute.

    I added console.exe to the path variable manually.

    Could you tell me what i am doing wrong? Do i have to have a main colsoleZ entry somewhere in the registry because i can´t find one?

    All the best

    Reply
    1. Dave Post author

      I think you just need to fix the quotes and escape the backslashes:

      [HKEY_CLASSES_ROOT\Directory\shell\Console\command]
      @="C:\\ProgramData\\Chocolatey\\bin\\Console.exe -d \"%V\""
      

      Make sure those are actual quotes and not fancy quotes (the kind WordPress insists on changing all my quotes to, ugh).

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s