Hide extensions of known file types

B

Bob Campbell

I have 2 computers, both are running Windows XP Pro SP1.
On both, I have unchecked the Hide extensions of known
file types (under Folder Options).

On both files, .lnk is not listed in the known file types.

On one computer the .lnk does not appear in the desktop
shortcuts, which is what I want; on the other
computer, .lnk is required on the desktop shortcut names,
and I have to put .lnk in the name whenever I rename them.

In the Microsoft Knowledge Base, to register a file type,
it says to right click on a file of that type and click
open, but there is no open option for .lnk file type
files. (Although I think .lnk is a special file type, and
is not supposed to show in the list of known file types).
 
C

cquirke (MVP Win9x)

On Thu, 22 Jan 2004 16:35:36 -0800, "Bob Campbell"
I have 2 computers, both are running Windows XP Pro SP1.
On both, I have unchecked the Hide extensions of known
file types (under Folder Options).
On both files, .lnk is not listed in the known file types.
On one computer the .lnk does not appear in the desktop
shortcuts, which is what I want; on the other
computer, .lnk is required on the desktop shortcut names,
and I have to put .lnk in the name whenever I rename them.
In the Microsoft Knowledge Base, to register a file type,
it says to right click on a file of that type and click
open, but there is no open option for .lnk file type
files. (Although I think .lnk is a special file type, and
is not supposed to show in the list of known file types).

File associations (as well as CLSIDs and other touch-me-nots) are
managed in HKEY_CLASSES_ROOT in the registry. In the case of XP, the
system-wide Software\Classes is augmented by per-user equivalents, so
HKCR is no longer a simple alias to HKLM\Software\Classes; instead, it
is the composite overlay of both.

File name extensions will always be hidden if:
- an AlwaysHideExt key is present (overrides NeverHideExt)
- or is that NeverShowExt and AlwaysShowExt? Memory fades...
- an ISSHORTCUT entry is present

Don't mess with IsShortcut; do feel free to play with the others.
Expect the Start Menu to look like porridge, though.


--------------- ----- ---- --- -- - - -
Dreams are stack dumps of the soul
 
B

Bob Campbell

Thanks guys. It was the

[HKEY_CLASSES_ROOT\lnkfile]
"NeverShowExt"=""

that was missing on my other computer.
 
A

Alex Nichol

Bob said:
I have 2 computers, both are running Windows XP Pro SP1.
On both, I have unchecked the Hide extensions of known
file types (under Folder Options).

On both files, .lnk is not listed in the known file types.

On one computer the .lnk does not appear in the desktop
shortcuts, which is what I want; on the other
computer, .lnk is required on the desktop shortcut names,
and I have to put .lnk in the name whenever I rename them.

The extension .lnk is normally marked 'Never show extension', so as to
keep the names of desktop shortcuts simple, and avoid people renaming
the extension out of existence. But if you really want, run
regedit.exe, open to
HKEY_CLASSES_ROOT\lnkfile
and delete the NeverShowExt
in the right pane
 
A

Alex Nichol

cquirke said:
File associations (as well as CLSIDs and other touch-me-nots) are
managed in HKEY_CLASSES_ROOT in the registry. In the case of XP, the
system-wide Software\Classes is augmented by per-user equivalents, so
HKCR is no longer a simple alias to HKLM\Software\Classes; instead, it
is the composite overlay of both.

File name extensions will always be hidden if:
- an AlwaysHideExt key is present (overrides NeverHideExt)
- or is that NeverShowExt and AlwaysShowExt? Memory fades...

NeverShowExt. Its a value in the right pane, rather than a key

Warning - there are more complications on File Associations in XP< if
you have not run into them. There are the set at
HKCR\SystemFileAssociations
(it is the one in there for Image that forces the Picture Viewer to
default over any graphic program you may think you have installed to
default)
as well as the user dependent lot at HKCU\. . . \Explorer\FileExts

ANd some associations get a CLSIOD reference built in, that can
complicate it further. . ANd downloaded files may get involved with
HKCR\.Mime\Database\ContentType
(which is where you may find things like jpg files saving as j.jpeg for
example)
 
C

cquirke (MVP Win9x)

cquirke (MVP Win9x) wrote:
NeverShowExt. Its a value in the right pane, rather than a key

That's the one; I forgot the details :)
Warning - there are more complications on File Associations in XP< if
you have not run into them. There are the set at
HKCR\SystemFileAssociations
(it is the one in there for Image that forces the Picture Viewer to
default over any graphic program you may think you have installed to
default)

Yes, that's an addition to the usual "unknown", "all files", "folder"
etc. inheritances or object overlap. Thanks for the heads-up on
Picture Viewer; I'd love to use IView in that role instead...
incidentally, IView does something crucial with videos that nothing
else seems to offer; custom playback speed, from 5% to > 100%
as well as the user dependent lot at HKCU\. . . \Explorer\FileExts

Those I haven't seen; is that the MRU used as the first tier of
OpenWith, in the WinME-and-later form of this facility?
ANd some associations get a CLSIOD reference built in, that can
complicate it further. .

Heh - try handcrafting .doc management so that the viewer becomes the
default action and Word is relegated to a rt-click option (or get the
viewer to Print, instead of slower-and-runs-macros Word). Thar be
CLSID hell, as required for .doc version awareness perhaps.
ANd downloaded files may get involved with
HKCR\.Mime\Database\ContentType
(which is where you may find things like jpg files saving as j.jpeg for
example)

Ah. There's a need to sanity-check all of these things against each
other and treat mismatches as risk events to be flagged. For example:
- Word macros in an RTF or HTML file
- raw Win32PE code within a .pif "shortcut"
- code files MIME-wrapped as inline HTML content
MS twigged on the last, sorta, but none of these should be.


--------------- ----- ---- --- -- - - -
Dreams are stack dumps of the soul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top