.LNK files are now opening notepad when double-clicked

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
mastabog
Junior Member
Junior Member
Posts: 72
Joined: 2004-03-07, 21:36 UTC

.LNK files are now opening notepad when double-clicked

Post by *mastabog »

Hello all, Christian,

I'm sure it is something I did because it began happenning recently so I'm not blaming WinCmd at all, but maybe one of you can help because it only happens in wincmd. I am using WinXP Pro SP1, all updates.

When I double click a LNK file (a simple windows link file) in wincmd it opens notepad (practically calling the system "edit" on the file). If the LNK is on the desktop, or i do the same thing using windows explorer it works OK, meaning it launches the linked program.

I've tried modifying and rebuilding registry data for the .lnk and lnkfile in HKCR but it didn't help or maybe there was something I missed.

I will post the reg dump of .lnk and lnkfile and maybe someone can do the same to help me compare. You can dump the registry info for those using these two commands:

Code: Select all

reg export "HKEY_CLASSES_ROOT\.lnk" lnk.reg
reg export "HKEY_CLASSES_ROOT\lnkfile" lnkfile.reg
And then copy and paste here the contents of lnk.reg and lnkfile.reg. This prolly wouldn't help solving it as windows explorer works, but I'm not sure. It might be something in WinCmd ...


Here are my dumps:

Code: Select all

[HKEY_CLASSES_ROOT\.lnk]
@="lnkfile"

[HKEY_CLASSES_ROOT\.lnk\ShellEx]

[HKEY_CLASSES_ROOT\.lnk\ShellEx\{000214EE-0000-0000-C000-000000000046}]
@="{00021401-0000-0000-C000-000000000046}"

[HKEY_CLASSES_ROOT\.lnk\ShellEx\{000214F9-0000-0000-C000-000000000046}]
@="{00021401-0000-0000-C000-000000000046}"

[HKEY_CLASSES_ROOT\.lnk\ShellEx\{00021500-0000-0000-C000-000000000046}]
@="{00021401-0000-0000-C000-000000000046}"

[HKEY_CLASSES_ROOT\.lnk\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{00021401-0000-0000-C000-000000000046}"

[HKEY_CLASSES_ROOT\.lnk\ShellNew]
"Command"="rundll32.exe appwiz.cpl,NewLinkHere %1"
and:

Code: Select all

[HKEY_CLASSES_ROOT\lnkfile]
@="Shortcut"
"EditFlags"=dword:00000001
"NeverShowExt"=""
"IsShortcut"=""

[HKEY_CLASSES_ROOT\lnkfile\CLSID]
@="{00021401-0000-0000-C000-000000000046}"

[HKEY_CLASSES_ROOT\lnkfile\shellex]

[HKEY_CLASSES_ROOT\lnkfile\shellex\ContextMenuHandlers]

[HKEY_CLASSES_ROOT\lnkfile\shellex\ContextMenuHandlers\Offline Files]
@="{750fdf0e-2a26-11d1-a3ea-080036587f03}"

[HKEY_CLASSES_ROOT\lnkfile\shellex\ContextMenuHandlers\{00021401-0000-0000-C000-000000000046}]
@=""

[HKEY_CLASSES_ROOT\lnkfile\shellex\DropHandler]
@="{00021401-0000-0000-C000-000000000046}"

[HKEY_CLASSES_ROOT\lnkfile\shellex\IconHandler]
@="{00021401-0000-0000-C000-000000000046}"

[HKEY_CLASSES_ROOT\lnkfile\shellex\PropertySheetHandlers]

[HKEY_CLASSES_ROOT\lnkfile\shellex\PropertySheetHandlers\ShimLayer Property Page]
@="{513D916F-2A8E-4F51-AEAB-0CBC76FB1AF8}"
Thanks for any help,
Bogdan
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.lnk

Icfu
This account is for sale
mastabog
Junior Member
Junior Member
Posts: 72
Joined: 2004-03-07, 21:36 UTC

Post by *mastabog »

That doesn't solve it ... it didn't contain an associated program anyway (all keys were empty). Any other ideas?
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

I have compared your reg extraction with the default XP software hive in \windows\repair, one difference only:

Delete the default value in [HKEY_CLASSES_ROOT\lnkfile\shellex\ContextMenuHandlers\{00021401-0000-0000-C000-000000000046}], this will fix your problem maybe.

Alternative:
Check, if you see an entry with .lnk extension under HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Extensions

If that doesn't help:
Do you have the problem in all folders with all .lnk files or just in specific folders or links to specific file types? Try out some, links to exe, vids, mp3s, etc... And put them in different folders, at least one folder you created yourself and the desktop folder.

Icfu
This account is for sale
mastabog
Junior Member
Junior Member
Posts: 72
Joined: 2004-03-07, 21:36 UTC

Post by *mastabog »

Deleted that key .. still opens notepad
I already have checked the HKCU\Software\Microsoft\Windows NT\CurrentVersion\Extensions key for an association of lnk and there is none (if it were, then the problem wwould have appeared in windows explorer or desktop also).

Yes .. it happens ONLY in wincmd, no matter what directory (even newly creaed ones) and/or drive the lnk is in and no matter where the lnk points to (executables, movies, mp3s, etc). It doesnt happen if I do the same in Windows Explorer or on desktop (i've also created new lnk files on the desktop).

It must be something related to wincmd ... all other programs launch the lnk instead of editing it. It seems wincmd calls the "edit" action on the file. One more thing, while in wincmd, if you right click (and you have chosen to have the systems right click menu on right click) and you choose the first bold link file name then it launches the file. But if you double-click or press enter on it, it opens notepad, which is weird because normally the double-click or pressing enter should have the same effect as the bold action in the right-click menu ...

Searched google, found nothing ...
Last edited by mastabog on 2004-08-02, 13:07 UTC, edited 1 time in total.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

I already have checked the HKCU\Software\Microsoft\Windows NT\CurrentVersion\Extensions key for an association of lnk and there is none (if it were, then the problem appeard in windows explorer or desktop also).
That key is only used by TC nowadays, please make sure you have seen that I posted two different keys:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts (usual user dependent key)
and
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Extensions (key used by TC, I have not seen other applications storing there, it's used when you associate file extensions using TC!)

Explorer and TC are checking reg keys in completely different order when double clicking. So if TC shows an error and Explorer does not it doesn't mean that TC has a bug but that it has checked a corrupted key first.
But if you double-click or press enter on it, it opens notepad, which is weird because normally the double-click or pressing enter should have the same effect as the bold action in the right-click menu ...
Not necessarily. For example you will directly access a zip archive or any other file association you associated to a packer plugin in TC when double clickling or pressing Enter even though you may have associated it to WinRAR and the context menu entry is bold.

Use Regmon from sysinternals.com to analyze which keys are processed when double clicking a .lnk file and post the log here. Set an include filter on "lnk" so it doesn't get too big.

Icfu
This account is for sale
mastabog
Junior Member
Junior Member
Posts: 72
Joined: 2004-03-07, 21:36 UTC

Post by *mastabog »

Don't worry, i saw the different keys.
I never said its a wincmd bug. I specifically stated in the 1st post that i do not blame wincmd at all. I only said its wincmd related (which it is) not originated.

I completely forgot about regmon and I used to use it a lot. Will post results.
mastabog
Junior Member
Junior Member
Posts: 72
Joined: 2004-03-07, 21:36 UTC

Post by *mastabog »

Ok .. ran regmon and I used "lnk;extensions" for the include filter, nothing for exclude and all action checkboxes checked (regmon v6.10)

I monitored since before double-clicking until notepad opened completely. I posted the results here: http://bog.webhop.net/regmon.log

The file is a tab sepparated value, if its not very readable for you then you can fetch it and load it in excel using tab as column separator.

p.s. the HKCU\Software\Microsoft\Windows NT\CurrentVersion\Extensions key was never accessed/queried for any association.

Can you please do the same? that is monitor with regmon when double-clicking and post the results here or somewhere else so i can compare, instead of telling me what you see different. And also, can you do the same and run those 2 "reg export" commands?

Thanks a lot for your time,
Bogdan
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

And also, can you do the same and run those 2 "reg export" commands?
I already did that, that's why I saw the difference... Besides the language differences (German-English) they are completely the same:
http://www.ghisler.ch/board/viewtopic.php?t=1966

Please do a try a clean TC installation in the meantime to exclude errors in wincmd.ini.

EDIT:
Why have you told me that you have deleted the key HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.lnk?

It's still there! You haven't deleted it...

24 1.35044528 TOTALCMD.EXE:3992 OpenKey HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.lnk SUCCESS

Check another key please:
[HKEY_LOCAL_MACHINE\software\Classes\CLSID\{00021401-0000-0000-C000-000000000046}]

[HKEY_LOCAL_MACHINE\software\Classes\CLSID\{00021401-0000-0000-C000-000000000046}]
@="Verknüpfung"

[HKEY_LOCAL_MACHINE\software\Classes\CLSID\{00021401-0000-0000-C000-000000000046}\InProcServer32]
@="shell32.dll"
"ThreadingModel"="Apartment"

[HKEY_LOCAL_MACHINE\software\Classes\CLSID\{00021401-0000-0000-C000-000000000046}\PersistentAddinsRegistered]

[HKEY_LOCAL_MACHINE\software\Classes\CLSID\{00021401-0000-0000-C000-000000000046}\PersistentAddinsRegistered\{89BCB740-6119-101A-BCB7-00DD010655AF}]
@="{00021401-0000-0000-C000-000000000046}"

[HKEY_LOCAL_MACHINE\software\Classes\CLSID\{00021401-0000-0000-C000-000000000046}\PersistentHandler]
@="{00021401-0000-0000-C000-000000000046}"

[HKEY_LOCAL_MACHINE\software\Classes\CLSID\{00021401-0000-0000-C000-000000000046}\ProgID]
@="lnkfile"

[HKEY_LOCAL_MACHINE\software\Classes\CLSID\{00021401-0000-0000-C000-000000000046}\shellex]

[HKEY_LOCAL_MACHINE\software\Classes\CLSID\{00021401-0000-0000-C000-000000000046}\shellex\MayChangeDefaultMenu]

Regmonlog:
http://icfu.i-networx.de/regmon.log
(deactivate download manager)

Icfu
Last edited by icfu on 2004-08-02, 14:33 UTC, edited 1 time in total.
This account is for sale
mastabog
Junior Member
Junior Member
Posts: 72
Joined: 2004-03-07, 21:36 UTC

Post by *mastabog »

icfu wrote:Why have you told me that you have deleted the key HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.lnk?

It's still there! You haven't deleted it...
Out of fun, because I like to lie to people .......... :roll:

I *DID* delete it ... somehow it got recreated (maybe when TC started) or I honestly don't know how. I haven't noticed it was the same key you specified while looking in the regmon log.

Anyway, I made a copy of TC (as is) then uninstalled it, then reinstall it in another dir than the initial one (to lose trace of any former settings). After reinstall NO lnk file was working NOWHERE .. neither from desktop/start menu/explorer/toolbars/wincmd .. nothing. This time it did nothing after double click or pressing enter. As if you never launched it. // i gotta admit i got pretty nervous at this point.

Then I used this reg file: http://bog.webhop.net/restore-lnk.reg, imported it and now links work ok even from TC. I also restored the old installation (with the same files, same ini and everything and in the same old dir) from the copy I made at the beginning and that works ok also now.

Thanks for your suggestions,
Bogdan

p.s. There is a saying that goes: "Assumption is the mother of all f-word-ups"
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Edited, check regmonlog above.

I have checked the regfile you posted, it's not original XP. You can find the original XP entries in the thread I mentioned above...

You have installed a Shell extension which affects .lnk:
CLSID\{500202A0-731E-11d0-B829-00C04FD706EC}

No idea what that is, please check that...

Good luck

Icfu
This account is for sale
mastabog
Junior Member
Junior Member
Posts: 72
Joined: 2004-03-07, 21:36 UTC

Post by *mastabog »

For what it's worth, I already solved the problem :). See my previous post.

Even if the reg file is not from a "fresh installed" winxp, it did fix the lnk files association when links were not working at all (see my previous post). You can find that reg file on a lot of websites and i think i even saw one on the ms kb website.

About the class id key you mentioned, yes ... its inexistent in my registry (no classes or interfaces by that id). It can be safely deleted. I also updated the reg file.

Again, thanks a lot for your time and suggestions,
Bogdan
Post Reply