Explorer integration: Difference between revisions

From TotalcmdWiki
Jump to navigation Jump to search
mNo edit summary
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This article describes how to add a context menu entry "Total Commander" to be able to open folders in Total Commander.
You can add a context menu entry "Total Commander" that will open folders in Total Commander.


* Create a new text file with a .REG extension (Windows Registry Script), e.g. TC.REG. Paste the following text into it:
* Create a new text file with a <tt>.reg</tt> extension (Windows Registry Script), e.g. <tt>tc.reg</tt>.
* Paste the following text into it:


  REGEDIT4
  REGEDIT4
Line 14: Line 15:
  @="\"C:\\Program files\\Total Commander\\TOTALCMD.EXE\" /O \"%1\""
  @="\"C:\\Program files\\Total Commander\\TOTALCMD.EXE\" /O \"%1\""


* Adapt the path in the last line to the real path to Total Commander. You can miss the /O parameter, in this example it is used to open the selected folder in an existing instance.
* Change the path in the last line to where you have installed Total Commander.


* If you want to have folders open in TC by default when double-clicking, remove the semicolons.
* The <tt>/O</tt> switch means reuse an existing Total Commander window rather than opening a new one, even if you have unticked the "Allow only 1 copy ..." [[Configuration]] option.


* Double-click this file in the TC or Explorer. You should see the messagebox about successfull importing of the registry script.
* If you want TC to open folders by default when double-clicking, remove the semicolons.


* Double-click this file in TC or Explorer. You should see a message-box about successfully updating the registry.


* If you want to reset to default Windows operation, import this regfile instead:
* To reset to opening folders in Windows explorer as usual, run this <tt>.reg</tt> file:


  REGEDIT4
  REGEDIT4
Line 30: Line 32:
  [-HKEY_CLASSES_ROOT\Folder\shell\Total_Commander]
  [-HKEY_CLASSES_ROOT\Folder\shell\Total_Commander]


===Windows 7===
On Windows 7 (and Vista?), the <tt>HKCR\Folder</tt> key controls not only ordinary folders but also things like Control Panel folders.  In previous versions of Windows, TC could open these but not in Windows 7 so you need a slightly different <tt>.reg</tt> file:
  Windows Registry Editor Version 5.00
 
  [HKEY_CLASSES_ROOT\Drive\shell]
  @="open"
 
  [HKEY_CLASSES_ROOT\Drive\shell\open]
 
  [HKEY_CLASSES_ROOT\Drive\shell\open\command]
  @="c:\\totalcmd\\TOTALCMD64.EXE /O \"%1\""
 
  [HKEY_CLASSES_ROOT\Directory\shell]
  @="open"
 
  [HKEY_CLASSES_ROOT\Directory\shell\open]
 
  [HKEY_CLASSES_ROOT\Directory\shell\open\command]
  @="c:\\totalcmd\\TOTALCMD64.EXE /O \"%1\""
The <tt>HKCR\Directory</tt> key only affects normal file folders, not special folders.
Powershell code is:
    New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
    sp HKCR:\Drive\shell -name "(Default)" -Value "open"
    mkdir HKCR:\Drive\shell\open\command -force
    sp HKCR:\Drive\shell\open\command  -name "(Default)" -Value "$ENV:COMMANDER_PATH\TOTALCMD64.EXE /O ""%1"""
    sp HKCR:\Directory\shell -name "(Default)" -Value "open"
    mkdir HKCR:\Directory\shell\open\command -force
    sp HKCR:\Directory\shell\open\command  -name "(Default)" -Value "$ENV:COMMANDER_PATH\TOTALCMD64.EXE /O ""%1"""
To open folders in Windows Explorer as usual, run this <tt>.reg</tt> file:
  Windows Registry Editor Version 5.00
 
  [HKEY_CLASSES_ROOT\Drive\shell]
  @="none"
 
  [HKEY_CLASSES_ROOT\Directory\shell]
  @="none"


===Recycle Bin Integration===
===Recycle Bin Integration===
Line 39: Line 84:
  [HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\open\command]
  [HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\open\command]
  @="\"C:\\TOTALCMD\\totalcmd.exe\" /O /T \"C:\\RECYCLER\\S-1-5-21-606747145-162531612-682003330-1003\\\""
  @="\"C:\\TOTALCMD\\totalcmd.exe\" /O /T \"C:\\RECYCLER\\S-1-5-21-606747145-162531612-682003330-1003\\\""


* For reset to default Windows behaviour of Recycle Bin:
* For reset to default Windows behaviour of Recycle Bin:
Line 47: Line 91:
  [-HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\]
  [-HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\]
  @=""
  @=""


{{translated|Ordner_im_TC_statt_im_Explorer_%C3%B6ffnen|Configuration}}
{{translated|Ordner_im_TC_statt_im_Explorer_%C3%B6ffnen|Configuration}}

Revision as of 12:40, 23 May 2020

You can add a context menu entry "Total Commander" that will open folders in Total Commander.

  • Create a new text file with a .reg extension (Windows Registry Script), e.g. tc.reg.
  • Paste the following text into it:
REGEDIT4

;[HKEY_CLASSES_ROOT\Folder\shell] 
;@="Total_Commander"

[HKEY_CLASSES_ROOT\Folder\shell\Total_Commander] 
@="Total Commander"

[HKEY_CLASSES_ROOT\Folder\shell\Total_Commander\command] 
@="\"C:\\Program files\\Total Commander\\TOTALCMD.EXE\" /O \"%1\""
  • Change the path in the last line to where you have installed Total Commander.
  • The /O switch means reuse an existing Total Commander window rather than opening a new one, even if you have unticked the "Allow only 1 copy ..." Configuration option.
  • If you want TC to open folders by default when double-clicking, remove the semicolons.
  • Double-click this file in TC or Explorer. You should see a message-box about successfully updating the registry.
  • To reset to opening folders in Windows explorer as usual, run this .reg file:
REGEDIT4

[HKEY_CLASSES_ROOT\Folder\shell]
@=""

[-HKEY_CLASSES_ROOT\Folder\shell\Total_Commander]

Windows 7

On Windows 7 (and Vista?), the HKCR\Folder key controls not only ordinary folders but also things like Control Panel folders. In previous versions of Windows, TC could open these but not in Windows 7 so you need a slightly different .reg file:

 Windows Registry Editor Version 5.00
 
 [HKEY_CLASSES_ROOT\Drive\shell]
 @="open"
 
 [HKEY_CLASSES_ROOT\Drive\shell\open]
 
 [HKEY_CLASSES_ROOT\Drive\shell\open\command]
 @="c:\\totalcmd\\TOTALCMD64.EXE /O \"%1\""
 
 [HKEY_CLASSES_ROOT\Directory\shell]
 @="open"
 
 [HKEY_CLASSES_ROOT\Directory\shell\open]
 
 [HKEY_CLASSES_ROOT\Directory\shell\open\command]
 @="c:\\totalcmd\\TOTALCMD64.EXE /O \"%1\""

The HKCR\Directory key only affects normal file folders, not special folders.

Powershell code is:

   New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
   sp HKCR:\Drive\shell -name "(Default)" -Value "open"
   mkdir HKCR:\Drive\shell\open\command -force
   sp HKCR:\Drive\shell\open\command  -name "(Default)" -Value "$ENV:COMMANDER_PATH\TOTALCMD64.EXE /O ""%1"""
   sp HKCR:\Directory\shell -name "(Default)" -Value "open"
   mkdir HKCR:\Directory\shell\open\command -force
   sp HKCR:\Directory\shell\open\command  -name "(Default)" -Value "$ENV:COMMANDER_PATH\TOTALCMD64.EXE /O ""%1"""

To open folders in Windows Explorer as usual, run this .reg file:

 Windows Registry Editor Version 5.00
 
 [HKEY_CLASSES_ROOT\Drive\shell]
 @="none"
 
 [HKEY_CLASSES_ROOT\Directory\shell]
 @="none"

Recycle Bin Integration

  • If you want to open the Recycle Bin in Total Commander:
REGEDIT4

[HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\open\command]
@="\"C:\\TOTALCMD\\totalcmd.exe\" /O /T \"C:\\RECYCLER\\S-1-5-21-606747145-162531612-682003330-1003\\\""
  • For reset to default Windows behaviour of Recycle Bin:
REGEDIT4

[-HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\]
@=""

Back to Configuration