Long filename issue with shell ext.

Harry Potter

Honorable
Jun 26, 2012
105
0
10,680
I've been experimenting with registry settings, including associating documents with applications and adding to the ShellNew menu. Now, usually, they work, but not always. Somebody elsewhere helped me with the ShellNew menu, and now it works. However, I added an association to the .txt extension to a text editor and a shortcut to the SendTo menu to add a template to a database. Both report SFNs, and I don't know why. Both the exported registry tree for the .txt file class (the issue is with the tm.exe app. in the open2 key) and the SendTo entry shortcut's command line follow:
----------------------------
REGEDIT4

[HKEY_CLASSES_ROOT\txtfile]
@="Text Document"

[HKEY_CLASSES_ROOT\txtfile\DefaultIcon]
@="shell32.dll,-152"

[HKEY_CLASSES_ROOT\txtfile\shell]

[HKEY_CLASSES_ROOT\txtfile\shell\open]

[HKEY_CLASSES_ROOT\txtfile\shell\open\command]
@="C:\\WINDOWS\\NOTEPAD.EXE %1"

[HKEY_CLASSES_ROOT\txtfile\shell\print]

[HKEY_CLASSES_ROOT\txtfile\shell\print\command]
@="C:\\WINDOWS\\NOTEPAD.EXE /p %1"

[HKEY_CLASSES_ROOT\txtfile\shell\open2]
@="Open with &Text Master"

[HKEY_CLASSES_ROOT\txtfile\shell\open2\command]
@="\"G:\\DellPC\\Text Master\\tm.exe\" %1"

------------------------
AddTemplate command line:
C:\MyPrgs\Win32\Picker\AddTemplate.exe %1
------------------------
I would appreciate any help.
 

gabelossus

Honorable
Jan 26, 2014
21
0
10,520
If you have duplicates of registry entries it can really screw things up. I had a problem when I installed two programs that are both products of Cakewalk. They use similar settings in the registry. One of the two bluescreened on me, and then when I rebooted, neither of them would open. I deleted the registry key and they worked.

So try and look around for a (.reg) somewhere that contains the original Shell entries, and put that back in the registry, and start over again with making the new entries.

I think I saw one on Microsoft.com.
 

Harry Potter

Honorable
Jun 26, 2012
105
0
10,680
The tm.exe entry is the only change I made to the given key. I think it's tm.exe's fault because, when I drag a file onto its icon, it does the same thing. Now, I solved the problem with AddTemplate.exe by converting the given filename to a lfn. However, this shouldn't be necessary; Win98 should automatically pass the lfn.