Where are .dat filetypes defined?

C

charles

Right clicking on a .dat file show an edit command on the context menu
which doesn't work on this w2k machine. I tried to find where that
filetype action was defined but found nothing in CLASSES_ROOT. The
only reference is in
USERS\xxx\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.dat
which only seems to hold the Openwith info.

Can anyone explain how .dat files are managed and where I can find the
edit definition and fix it?

Thanks.
 
J

John John

Why are you asking about this? There are different types of .dat files,
antivirus software for example might use .dat files, Internet Explorer
uses .dat files, and so on. These files are not meant to be edited
manually, if a program uses.dat files it will normally automatically use
them or modify them when needed without user intervention.

In the context of this newsgroup the only .dat file that would be of
interest would be the Ntuser.dat files in the user profile folders.
Those are registry files, when a user logs on to Windows the
HKEY_CURRENT_USER registry key is created from the users ntuser.dat
file. That file is only meant to be edited with the registry editor or
when the user changes his user settings or does changes to his Windows
installation, then the changes are automatically done by Windows or by
third party tools and software installers.

John
 
C

charles

Why are you asking about this? There are different types of .dat files,
antivirus software for example might use .dat files, Internet Explorer
uses .dat files, and so on. These files are not meant to be edited
manually, if a program uses.dat files it will normally automatically use
them or modify them when needed without user intervention.

In the context of this newsgroup the only .dat file that would be of
interest would be the Ntuser.dat files in the user profile folders.
Those are registry files, when a user logs on to Windows the
HKEY_CURRENT_USER registry key is created from the users ntuser.dat
file. That file is only meant to be edited with the registry editor or
when the user changes his user settings or does changes to his Windows
installation, then the changes are automatically done by Windows or by
third party tools and software installers.

John

I'm asking about this because 1) There is a context menu entry for
..dat files that I can't find in the place in the registry where I
expect to find that kind of thing. 2) The entry in question, "edit",
does something unexpected when chosen and I want to find out why it is
doing that.

In more detail, choosing the "edit" menu item on a .dat file comes up
with an error box: "Cannot find the file 'filename.dat' (or one of its
components). Make sure the path and filename are correct and that all
required libraries are available." then does the right thing which is
to open the file using the program defined in the FileExts key ref'd
above. Where is this "edit" item defined and why is it throwing an
error?

In the context of this newsgroup, I am not asking about any specific
file, I am asking about how and where in the registry data is
maintained that controls the behavior of a set of files of this
particular type.
 
J

John John

Did you right click on it and look in its properties? Look at:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.DAT

John
 
C

charles

Yes, under that key there was a value named Application with the
contents being the name of the application I generally use to open
..dat files with. Earlier today I tried changing the data to another
application I would also use, a text/hex editor, to see what would
happen.

What happened was that the "edit" menu item disappeared off the
context menu for .dat files and the file opened correctly with the
specified application. I then changed the registry data back to the
original program and the "edit" item reappeared. I changed it to
another editor and an "Edit" menu item appeared but this time worked
correctly without an alert notification.

So this seems pretty bizarre to me but apparently a side effect of the
Application assigned to the type without any registry changes
corresponding to a .dat filetype that I would have expected. And all
works correctly but I don't know what changed to create/delete the
"edit" menu item.

Thank you for replying.
 
C

charles

Yes, thanks. I had forgotten the FileExts key vs CLASSES_ROOT. Still
surprised that there is not a root .dat entry.

And I don't know how the "Edit" menu entry is being created though it
seems to be automatically when assigned some text editors I use
(PSPad, Epsilon).

Thanks again for the info.
 

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