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

Posted on 2007-10-15
Last Modified: 2012-08-14
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?
Question by:ThinkPaper
    LVL 9

    Expert Comment

    What's the client OS (or OSes)?
    LVL 9

    Accepted Solution

    ... 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>

    LVL 4

    Assisted Solution

    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...
    LVL 4

    Expert Comment

    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.
    LVL 9

    Expert Comment

    ... nice suggestion.  Assuming we have a suitable app. registered against another extension able to handle this format, that's a great idea.
    LVL 9

    Expert Comment

    ... nice suggestion.  Assuming we have a suitable app. registered against another extension able to handle this format, that's a great idea.
    LVL 4

    Expert Comment

    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

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now