Delphi preview handler for .cmd files not working

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Delphi preview handler for .cmd files not working

Post by *Horst.Epp »

I can display *.cmd files fine with the TC CudaLister plugin
but would like to use the installed Delphi Preview handler
which displays this and many other file formats.
It works fine with Explorer, Everything and XYplorer
but not in TCs preview mode 8.
Other extensions like *.pas are working from TC but not *.cmd ?

https://github.com/RRUZ/delphi-preview-handler

The Registry info for cmd

Code: Select all

[HKEY_CLASSES_ROOT\.cmd]
@="cmdfile"
[HKEY_CLASSES_ROOT\.cmd\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"
[HKEY_CLASSES_ROOT\.cmd\shellex]
[HKEY_CLASSES_ROOT\.cmd\shellex\{8895B1C6-B41F-4C1C-A562-0D564250836F}]
@="{AD8855FB-F908-4DDF-982C-ADB9DE5FF000}"
=============================
[HKEY_CLASSES_ROOT\cmdfile]
@="Windows Command Script"
EditFlags=type(3)
"FriendlyTypeName"="@%SystemRoot%\System32\acppage.dll,-6003"
[HKEY_CLASSES_ROOT\cmdfile\DefaultIcon]
@="%SystemRoot%\System32\imageres.dll,-68"
[HKEY_CLASSES_ROOT\cmdfile\shell]
[HKEY_CLASSES_ROOT\cmdfile\shell\edit]
[HKEY_CLASSES_ROOT\cmdfile\shell\edit\command]
@="%SystemRoot%\System32\NOTEPAD.EXE %1"
[HKEY_CLASSES_ROOT\cmdfile\shell\open]
EditFlags=type(3)
[HKEY_CLASSES_ROOT\cmdfile\shell\open\command]
@=""%1" %*"
[HKEY_CLASSES_ROOT\cmdfile\shell\print]
[HKEY_CLASSES_ROOT\cmdfile\shell\print\command]
@="%SystemRoot%\System32\NOTEPAD.EXE /p %1"
[HKEY_CLASSES_ROOT\cmdfile\shell\runas]
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\cmdfile\shell\runas\command]
@="%SystemRoot%\System32\cmd.exe /C "%1" %*"
[HKEY_CLASSES_ROOT\cmdfile\shell\runasuser]
@="@shell32.dll,-50944"
"Extended"=""
"SuppressionPolicyEx"="{F211AA05-D4DF-4370-A2A0-9F19C09756A7}"
[HKEY_CLASSES_ROOT\cmdfile\shell\runasuser\command]
"DelegateExecute"="{ea72d00e-4960-42fa-ba92-7792a7944c1d}"
[HKEY_CLASSES_ROOT\cmdfile\shellex]
[HKEY_CLASSES_ROOT\cmdfile\shellex\ContextMenuHandlers]
@="Compatibility"
[HKEY_CLASSES_ROOT\cmdfile\shellex\ContextMenuHandlers\Compatibility]
@="{1d27f844-3a1f-4410-85ac-14651078412d}"
[HKEY_CLASSES_ROOT\cmdfile\shellex\ContextMenuHandlers\OpenGLShExt]
@="{E97DEC16-A50D-49bb-AE24-CF682282E08D}"
[HKEY_CLASSES_ROOT\cmdfile\shellex\DropHandler]
@="{86C86720-42A0-1069-A2E8-08002B30309D}"
[HKEY_CLASSES_ROOT\cmdfile\shellex\PropertySheetHandlers]
[HKEY_CLASSES_ROOT\cmdfile\shellex\PropertySheetHandlers\ShimLayer Property Page]
@="{513D916F-2A8E-4F51-AEAB-0CBC76FB1AF8}"
[HKEY_CLASSES_ROOT\cmdfile\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{1531d583-8375-4d3f-b5fb-d23bbd169f22}"
=============================
[Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.cmd]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.cmd\OpenWithList]
"a"="XYplorer.exe"
"b"="ab"
"MRUList"="abc"
"c"="a"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.cmd\OpenWithProgids]
"cmdfile"=hex(0):
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Delphi preview handler for .cmd files not working

Post by *nsp »

It seems the the registry entry for cmdfile is not pointing to the Delphi previewer...
This is described in how-to-register-a-preview-handler end of step 1. (it seems that extfile takes precedence over .ext class entry)

Code: Select all

[HKEY_CLASSES_ROOT\cmdfile\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{1531d583-8375-4d3f-b5fb-d23bbd169f22}"
it should be :

Code: Select all

[HKEY_CLASSES_ROOT\cmdfile\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{AD8855FB-F908-4DDF-982C-ADB9DE5FF000}"
For other file type which have a <ext>file you can change the key shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f} pointing to {AD8855FB-F908-4DDF-982C-ADB9DE5FF000} which is the CLSID or the delphi previewer..
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Delphi preview handler for .cmd files not working

Post by *Horst.Epp »

nsp wrote: 2022-02-05, 16:46 UTC It seems the the registry entry for cmdfile is not pointing to the Delphi previewer...
This is described in how-to-register-a-preview-handler end of step 1. (it seems that extfile takes precedence over .ext class entry)

Code: Select all

[HKEY_CLASSES_ROOT\cmdfile\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{1531d583-8375-4d3f-b5fb-d23bbd169f22}"
it should be :

Code: Select all

[HKEY_CLASSES_ROOT\cmdfile\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{AD8855FB-F908-4DDF-982C-ADB9DE5FF000}"
Thanks a lot this, is the solution :D
Only the cmd extension had this problem, others I'm using are fine with mode 8.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
Post Reply