Dotaz Stopping VS2010 Automatic File Association

  • Thursday, October 13, 2011 12:14 AM
     
     

    Hi all,

    I use a basic text editor when ever I want to quickly open a C++ file from our source control system rather than VS2010 simply because it loads faster. However, VS2010 keeps stealing back the file associations when ever it starts. Is there a way to stop it doing so?

    Thanks for any forth coming answers.

All Replies

  • Saturday, October 15, 2011 2:57 PM
    Moderator
     
     

    Hi Boschy,

     

    Welcome to the MSDN forum.

     

    Is what you want changing the file association?

     

    Please right click the file>>Properties>>Look at the line “Opens with” and click “change”>>Find the application you want to use>>Enable “Always use the selected program to open this kind of file”>>OK>>Apply>>OK.

     

    If you have any other concerns, please feel free to let me know.

     

    Best Regards,


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked As Answer by Alexander SunModerator Thursday, October 20, 2011 3:32 AM
    • Unmarked As Answer by Boschy Friday, November 04, 2011 12:27 AM
    •  
  • Friday, November 04, 2011 12:28 AM
     
     

    Thanks Alexander. I am sorry it has taken me so long to get back!

    The problem is that once I change the association to another application, Visual Studio 2010 steals it back again the next time I start it.

  • Monday, November 07, 2011 6:19 AM
    Moderator
     
     

    Hi Boshy,

     

    If you use Windows XP, I recommend you take a look at this page: http://support.microsoft.com/kb/307859

     

    If you use Windows 7/Windows Vista, you can refer to this page: http://answers.microsoft.com/en-us/windows/forum/windows_7-files/problems-with-file-association-in-windows-7-64-bit/8a84fcec-22df-4942-8e35-d98dbe96e327

     

    If you have any other concerns, please feel free to let me know.

     

    Best Regards,


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Tuesday, November 15, 2011 4:15 AM
     
     

    Thanks Alexander.

    I fully understand how to change the application associated with a file type. I've done that with .cpp and .h file types a dozen times.

    The issue I have is that when I do that it all works fine until I start Visual Studio 2010. It remaps the .cpp and .h associations to itself, removing the associations I set. What I am trying to determines is whether it is possible to stop Visual Studio 2010 from overwritting my associations, not how to set a file association in the first place.

  • Tuesday, November 29, 2011 9:49 AM
    Moderator
     
     

    Hi Nuwud,

     

    Could you please let me know how did you start Visual Studio? Please provide specific steps.

     

    I tried to change .cpp and .h file association to notepad before. Then I start Visual Studio 2010 and close it. The file association of .cpp and .h are still notepad.

     

    If you have any other concerns, please feel free to let me know.

     

    Best Regards,


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us
  • Tuesday, March 06, 2012 11:19 PM
     
     

    Hi Alexander,

    Sorry to resurect an old thread. I got a bit snowed under and the issue slipped my mind.

    I start VS2010 via either the start menu or an icon on the task bar that I created from the start menu item. One thing I have noticed is that VS2010 doesn't always take the file associations immediately. Sometimes I can go several days before it will suddenly take it back. I need to do some more investigation and see if I can find a pattern to it's behaviour.