Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 7627
  • Last Modified:

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

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?
  • 4
  • 3
2 Solutions
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...
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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 http://www.paraglidernc.com/Files/RegShot1725.cab 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.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now