13
4
I have set up a custom file association for .cfg
to open in WordPad, but I can't seem to figure out how to remove it. How do I remove file associations in Windows 7?
13
4
I have set up a custom file association for .cfg
to open in WordPad, but I can't seem to figure out how to remove it. How do I remove file associations in Windows 7?
13
From a command window, you can use the "ASSOC" and "FTYPE" commands to add/edit/delete file type associations.
C:>assoc /?
ASSOC [.ext[=[fileType]]]
.ext Specifies the file extension to associate the file type with
fileType Specifies the file type to associate with the file extension
Type ASSOC without parameters to display the current file associations.
If ASSOC is invoked with just a file extension, it displays the current
file association for that file extension. Specify nothing for the file
type and the command will delete the association for the file extension.
and:
C:>ftype /?
FTYPE [fileType[=[openCommandString]]]
fileType Specifies the file type to examine or change
openCommandString Specifies the open command to use when launching
files of this type.
Type FTYPE without parameters to display the current file types that
have open command strings defined. FTYPE is invoked with just a file
type, it displays the current open command string for that file type.
Specify nothing for the open command string and the FTYPE command will
delete the open command string for the file type. Within an open
command string %0 or %1 are substituted with the file name being
launched through the assocation. %* gets all the parameters and %2
gets the 1st parameter, %3 the second, etc. %~n gets all the remaining
parameters starting with the nth parameter, where n may be between 2 and 9,
inclusive.
... ...
So (on my system), regarding .bkr files, these commands return:
C:>assoc .bkr
.bkr=bkrfile
C:>ftype bkrfile
bkrfile="F:\Program Files\path...\program.exe" "%1"
I created a new "test" file extension/file type (may require admin permissions):
C:>assoc .bzb
File association not found for extension .bzb
C:>assoc .bzb=MyBZBCustomFileType
.bzb=MyBZBCustomFileType
C:>assoc .bzb
.bzb=MyBZBCustomFileType
C:>ftype MyBZBCustomFileType
File type 'MyBZBCustomFileType' not found or no open command associated with it.
C:>ftype MyBZBCustomFileType=%SystemRoot%\system32\NOTEPAD.EXE %1
MyBZBCustomFileType=C:\Windows\system32\NOTEPAD.EXE %1
C:>echo Some text.>C:\Temp\file.bzb
C:>start "" C:\Temp\file.bzb
This opens "Notepad" editing my "dummy" file.
To delete the filetype association, first delete the connection of the filetype to the program like this:
C:>ftype MyBZBCustomFileType
MyBZBCustomFileType=C:\Windows\system32\NOTEPAD.EXE %1
C:>ftype MyBZBCustomFileType=
File type 'MyBZBCustomFileType' not found or no open command associated with it.
Then delete the file extension association (may require admin permissions):
C:>assoc .bzb
.bzb=MyBZBCustomFileType
C:>assoc .bzb=
C:>assoc .bzb
File association not found for extension .bzb
C:>start "" C:\Temp\file.bzb
(The dialogbox "Windows cannot open this file" opens)
C:>
For a GUI solution, I use PowerTools by Creative Elements. You can download and use it for free for 45 days on trial. This is a collection of tools, and you'd be using their File Type Doctor
tool to add/edit/delete file type associations.
5
You can remove the association in the registry:
HKEY_CLASSES_ROOT\.cfg\ShellEx\
And delete the key with the GUID that corresponds to WordPad.
2reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.cfg
– Steve Pitchers – 2015-05-01T14:32:48.673
1That will remove it altogether if that's what you want. If you just want to change it, right click and choose "Open With". Then choose the new program and check the "always use this to open files of this type". – LilCodger – 2013-03-21T16:14:14.947
4
You can use this cool third-party application, Default Programs Editor:
Default Programs Editor makes it easy to fix file association settings in Windows, including context menu items, icons, and descriptions. Also: autoplay settings and default programs settings ...all without fiddling around in the registry.
2
The way to change associations (it doesn't seem to let you remove though) with built-in Windows 7 tools (UI ones) is to open the Start Menu, then choose Default Programs. (Or if it's not present, open Start Menu, Control Panel (you might need to change from View by category to View by large icons) and then Default Programs.)
Then select Associate a file type or protocol with a program. You'll get a list with the associations currently configured in your computer. Find the extension you want to change and double-click it to change its configuration.
0
Right click a .cfg file -> Open with -> Choose Default program. Then check the "Always use the selected program to open this kind of file" and select a program from the list or click the Browse button to manually select a program from the filesystem.
Full guide with images: http://www.sevenforums.com/tutorials/12196-open-change-default-program.html
5Yes, but is it possible to remove it this way? – Nathan2055 – 2013-03-21T21:34:53.310
@KevinFegan, Is
assoc .bzb=
andftype MyBZBCustomFileType=
the official way to delete file associations or is there another proper way to do it?ftype /?
andassoc /?
doesn't seem to mention using that it's legal to use=
to delete file associations. – Pacerier – 2015-08-25T10:19:59.383@Pacerier - if you review my answer (above), the first 2 "code" sections were captured from
assoc /?
andftype /?
. Forassoc /?
:Specify nothing for the file type and the command will delete the association for the file extension.
, and forftype /?
:Specify nothing for the open command string and the FTYPE command will delete the open command string for the file type.
– Kevin Fegan – 2015-08-29T03:50:55.573@KevinFegan, Ic. – Pacerier – 2015-10-19T13:06:35.903
2This doesn't seem to work for associations created by the user via the GUI. – depquid – 2013-03-21T18:53:10.210
@depquid - Do you get an error message when you try it, or does it just silently fail ? Keep in mind, you may need to open the command prompt as an administrator for it (assoc/ftype) to work. Also, I added info on a GUI (File Type Editor) that I use... it should work for you. – Kevin Fegan – 2013-03-21T19:04:58.997