Win admin by day, i have to deal with this crap sometimes, so i wrote up a, what i believe to be a neat tutorial, though its not the type of stuff i would post on my website, it would fit fine here
This works as well for Terminal Server (and i wrote this for that reason) as it does on your regular home system, commands are the same, principals are too, and so forth.
File association on Windows Server or other operating system is a global setting, thus has to be approached very carefully and thoughtfully.
There are two utilities to assist you with this (both command line):
assoc and ftype
assoc - associates an extension to a association defined in ftype
ftype - associates an ftype name to a program
Why two utilities? Simple, one ftype can point to many associated extensions, DWF viewer, for example points to both a .dwf file and .dwfx, thus you will likely have more associations then file types.
How to facilitate associating a file:
First you want to look at what kind of values, the extension is associated with. Open up command prompt and run assoc (no arguments). You are now presented with the list of all of the extensions your computer/server knows. Scroll up or down to find the one in question, or lack thereof.
If you find the extension, note where it points.
ex:
.txt=TextFile
Now run ftype (no arguments); this will list the association of the second part of the previous command, to the actual program. Scroll up/down to find your file type association.
ex:
TextFile=WinWord.exe "%1"
Now the fun stuff:
If you want to disassociate an extension, simply run assoc with the extension equal to nothing
ex:
assoc .txt=
if you want to change the associated program, run ftype with the already named association and point it to a different application, note follow the program with a "%1" which will, upon execution of the command, insert the first argument (aka the file name) and append it to the end of the command.
ex:
ftype TextFile="C:\Program Files\Crazy Text Editor\editor.exe" "%1"
If you want to create a new extension, or change another one, you can now point to the program association
ex:
assoc .text=TextFile
Any file that ends with .text, and .txt will now be opened in the "Crazy Text Editor"
Note: BE EXTREMELY CAREFUL WITH THIS, YOU CAN REALLY MESS UP YOUR SYSTEM!!!
----------------
Microsoft, the leader in using innovative tactics to promote irksome experience, coupled with antiquated technology that's held together by a pyramid of makeshift afterthoughts.
Apple, the leader in using irksome tactics to promote innovative experience, coupled with an antiquated core that's enhanced by state-of-the-art afterthoughts.
Linux, the leader in not using any tactics to promote user-defined experience, coupled with state-of-the-art core enhanced by innovative afterthoughts.
