How to globally set a file extension/type association? Group Policy? Registry?

ThinkPaper used Ask the Experts™
Ok.. I thought this should be simple.. but I can't seem to find the answer anywhere. XD
I need to push out a file type association to all the workstations so that when a user double clicks a file of a certain extension, it will ALWAYS open with a certain application.
For example, currently users are trying to open a MDI file and right now its not associated with anything, so it will prompt the user to pick what they want to use to open it.
I want to basically automatically have it associate with MS Office 2k3 so the user doesn't need to go thru this and it automatically opens by itself.
I thought that maybe I would be able to do this via Group Policy.. but can't seem to find where I would be able to set this. I guess another option is a logon script.. although that's not the preferred method.. Is there a registry key I can modify?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
What's the client OS (or OSes)?
... assuming it's XP or thereabouts, use the following steps -

1. on a machine without knowledge of how to open the files, double-click one
2. when the interface appears, select 'Select the program from a list' and click 'OK'
3. select the relevant application and enter a highly unique description
  - honestly, I usually use some kind of extremely strong swear word since I'm reasonably certain thats not going to exist elsewhere
4. click 'OK'
5. the application will open -- verify it pulled the document in to your satisfaction
6. if so, run 'REGEDIT'
7. highlight 'My Computer'
8. select 'Edit' --> 'Find'
9. enter your profanity
10. ensure the 'Data' checkbox is checked and click 'Find next'
11. once located, hit the tab key and right click the highlighted key in the left pane
12. select 'Export'
13. place the file somewhere suitable
14. right click the file and edit in Notepad and alter the description to something more corporate
15. distribute the .REG file via script, the script should contain something like -

REGEDIT /s <yourfilename.REG>

Maybe you can use the assoc command ?

Open a command prompt and type assoc.

It will list all your current associations.

or to check which association is associated with a particular extension do :

C:\>assoc .doc

Now, let's say you want to open the .myext files as Microsoft Word Doc files
You can use this command to do so.

C:\>assoc .myext=Word.Document.8

From then on, .myext files will be opened as if they were .doc files.
It will even get the same icon, etc...
11/26 Forrester Webinar: Savings for Enterprise

How can your organization benefit from savings just by replacing your legacy backup solutions with Acronis' #CyberProtection? Join Forrester's Joe Branca and Ryan Davis from Acronis live as they explain how you can too.

Of course, you could use this on a logon script...
You could track the registry changes made by this command through an utility like Regshot and use this if you prefer a regfile.

Personally, I would go with running the command in a login script.
... nice suggestion.  Assuming we have a suitable app. registered against another extension able to handle this format, that's a great idea.
... nice suggestion.  Assuming we have a suitable app. registered against another extension able to handle this format, that's a great idea.

OP said that he wanted to open it with Office 2003 (but didn't specify which application unfortunately or for which format this custom extension was), so I guess he has already since Office will only open the formats it knows about already... just a matter of knowing which format it is and equate it to the proper association ID.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial