File Associations, Stupid Question...

C

ChrisM

I'm hate to ask this, and I should know the answer. I've been using
computers long enough, but I just can't remember.

I inadvertantly associated a temporary file extension (.myfile) with an
application (MS Access). (I did 'Open With...' and forgot to uncheck the
box that says 'Always use this program...' - I wish that defaulted to no!)
[The file in case was in fact an Access database with a changed file
extension]

Anyway, I want to remove this association, but can't remember how to do it.
(the extension in question doesn't appear in the list of registered file
types under 'Folder Options')

Any help gratefully (if embarassedly) received ;-)

Cheers,

ChrisM
 
J

Jason Hall [MSFT]

--------------------
Reply-To: "ChrisM" <[email protected]>
From: "ChrisM" <[email protected]>
Subject: File Associations, Stupid Question...
Date: Wed, 26 May 2004 15:30:14 +0100
I'm hate to ask this, and I should know the answer. I've been using
computers long enough, but I just can't remember.

I inadvertantly associated a temporary file extension (.myfile) with an
application (MS Access). (I did 'Open With...' and forgot to uncheck the
box that says 'Always use this program...' - I wish that defaulted to no!)
[The file in case was in fact an Access database with a changed file
extension]

Anyway, I want to remove this association, but can't remember how to do it.
(the extension in question doesn't appear in the list of registered file
types under 'Folder Options')

Any help gratefully (if embarassedly) received ;-)

Cheers,

ChrisM
-----------------------

1. You can click on the properties for the file and "Change..." the "Opens
with:" field

or

2. You can delete the key for the extension under the following registry
(note: this will not change the icon):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileEx
ts



--
~~ JASON HALL ~~
~ Performance Support Specialist,
~ Microsoft Enterprise Platforms Support
~ This posting is provided "AS IS" with no warranties, and confers no
rights.
~ Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
~ Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
 
C

ChrisM

Hi Jason,

Thanks for your suggestions,
1. You can click on the properties for the file and "Change..." the "Opens
with:" field

That is OK, but as far as I could see you can only change the application
you are associated with, not remove it altogether.

With a little messing around, I found an alternative solution that didn't
involve changing the registry, and returned the icons back to the default.
For anyone that's interested, these are the steps that seem to work best.

1) Temporarily change the suffix of any files with the extension in question
2) In File Explorer, goto Tools -> Folder Options, FileTypes
3) Click 'New'
4) Enter extension in question and press OK
5) I then got a message 'You have customised files with extension 'MyFile'
To restore these files to their default type (FT000004) click Restore.
6) So click Restore.
7) Ensure the extension is still highlighted and click Delete
8) Change the filenames from step (1) back.

I'm sure I've fixed this before, and it didn't involve all that faffing
around. Maybe it was with an earlier version of Windows though...?

Regards,

ChrisM.
 
M

Matthias Tacke

:
With a little messing around, I found an alternative solution that didn't
involve changing the registry, and returned the icons back to the default.
For anyone that's interested, these are the steps that seem to work best.

1) Temporarily change the suffix of any files with the extension in question
2) In File Explorer, goto Tools -> Folder Options, FileTypes
3) Click 'New'
4) Enter extension in question and press OK
5) I then got a message 'You have customised files with extension 'MyFile'
To restore these files to their default type (FT000004) click Restore.
6) So click Restore.
7) Ensure the extension is still highlighted and click Delete
8) Change the filenames from step (1) back.

I'm sure I've fixed this before, and it didn't involve all that faffing
around. Maybe it was with an earlier version of Windows though...?

Regards,

ChrisM.

Sometimes the command line is faster:

assoc .myfile=

would have done the job :)

see assoc /? and the related ftype /?
 
C

ChrisM

assoc .myfile=
would have done the job :)

see assoc /? and the related ftype /?

Man, this file association thing seems to be very confusing... (buggy??)
:-/
I can't get the assoc command to do what I want at all! It only SEEMS to
effect the 'Type' description of a file, not the application that actually
opens it.

Try this if you can be bothered...

Create a new file called myFile.myExt
In File Explorer we have
icon: Default (white page with windows logo on it)
Type: 'MYEXT File'
DoubleClick: gives 'Open With' dialog

Right click, 'Open With', choose Access (or whatever)
icon: Access logo
Type: 'MYEXT File'
DoubleClick: Opens with access

In Command: type 'assoc .myExt = MSWORD.EXE'
.myExt=MSWORD.EXE
icon: Access
Type: 'MYEXT File'
DoubleClick: Opens with access

1.Go into Tools->Folder Options, FileTypes
2.Find MYEXT in the list, click 'Restore', then 'Delete'
icon: Default
type: MSWORD.EXE
DoubleClick: gives 'Open With' dialog

Do the steps I mentioned earlier:
1.Rename file to myFile.myExt_
2.Go into Tools->Folder Options, FileTypes
3.(MYEXT is not in the list)
4.Click 'New'
5.Type MYEXT
6.Click 'Ok'
7.Click 'Delete'
8.Confirm and close Folder Options dialog
9. Rename file back to myFile.myExt
icon: Default,
Type: 'MYEXT File'
DoubleClick: gives 'Open With' dialog
We're back to what we started with.

The point of all that was really to show that in my experiments,
FolderOptions and the 'assoc' command do not seem to do quite the same
thing.
If anyone can explain exactly how all this works, and what the hell is going
on I WOULD be interested, but at the end of the day, I've accomplished what
I wanted (Getting rid of the association between .MYFILE files and
MS-Access) and have a simple and quick strategy to fix it again in the
future (the steps I outlined in my previous post - takes less then 20
seconds which is quick enough for me...

Cheers, ;-)

ChrisM.
 
M

Matthias Tacke

ChrisM said:
Man, this file association thing seems to be very confusing... (buggy??)
:-/
I can't get the assoc command to do what I want at all! It only SEEMS
to effect the 'Type' description of a file, not the application that
actually opens it.

Try this if you can be bothered...
<snip>

I'm sorry for eventually misleading hints.
We're back to what we started with.

The point of all that was really to show that in my experiments,
FolderOptions and the 'assoc' command do not seem to do quite the same
thing.
If anyone can explain exactly how all this works, and what the hell is
going on I WOULD be interested, but at the end of the day, I've
accomplished what I wanted (Getting rid of the association between
.MYFILE files and MS-Access) and have a simple and quick strategy to
fix it again in the future (the steps I outlined in my previous post -
takes less then 20 seconds which is quick enough for me...
The relationship is a bit indirect.

ftype will give you the registered file types.
They have names which are not so obvious.

Assoc without arguments lists all the extensions with the associated
ftype name, *not* the application name.

Assoc .mdb returns on my pc:
C:\>assoc .mdb
..mdb=Access.Application.9

Ftype with that "index" name returns the path to the exe file:
C:\>ftype Access.Application.9
Access.Application.9="E:\Programme\Microsoft Office\Office\MSACCESS.EXE" /NOSTARTUP "%1"
----------------------------------------------------
I followed your example with .MyFile and MSAccess in explorer (XP Pro):
C:\>assoc .myfile
..myfile=MyFile_auto_file

C:\>ftype MyFile_auto_file
MyFile_auto_file="E:\Programme\Microsoft Office\Office\MSACCESS.EXE" /NOSTARTUP "%1"
----------------------------------------------------
As you can see there was an ftype name "MyFile_auto_file" generated.
There are now two registry entries in HKEY_Classes_Root.

You may look at these entries with regedit or look at them with reg.exe:
C:\>reg query HKEY_CLASSES_ROOT\.MyFile /S
C:\>reg query HKEY_CLASSES_ROOT\MyFile_auto_file /S

The subentries contain the description you may enter in the gui and the
program path and some more info.

HTH and sorry for any inconvenience I caused :)
 
C

ChrisM

Ahh, yes, now I see the relationship between assoc and ftype, it starts to
make sense.
I'm sorry for eventually misleading hints.
No worries :)


Thanks for all of your information, I think I understand how it works now.

HTH and sorry for any inconvenience I caused :)

'Inconvenience'? Don't be daft, you have been most helpful.
Many thanks,

ChrisM.
(I still think my way is easier though ;-) )
 

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