WinInfo Daily News   |   Windows IT Pro
in

SuperSite Blog

Vista tip of the week: Change file type associations on the fly

I received an interesting tip this week from Dan via email regarding removing and changing Windows Vista file type associations on the fly. I have to admit, I had never heard of this one:

You can remove a single file type association to more easily reassociate it. (You have to do this under admin rights, however.--Paul)

At a command prompt (cmd.exe) type assoc.file_type= Where file_type is the extension of the file type for which you want to remove the application association. As an example, you could stop PHP files from opening with WordPad by typing assoc.php= and then hitting Enter. The next time you open a PHP file, you will be prompted to choose a program again.

So this does work, but it's somewhat complicated. I recommend using the "Open with" trick instead. This can be used in two instances: When you want to change the association of a particular file type and when you want to just open a file with a different application on the fly. Here's how it works.

Locate the document or other file you'd like to open. Hold down the Shift key and right-click the file. You'll see a new option, Open With, appear. The Open With option will have a sub-menu associated with it. You can choose an option from this menu or select Choose Default Program.

From the Open With window, choose from the list of Recommended Programs. Or, click Browse to find a new program. When you locate a new program, it will appear in the Open With sub-menu and in the Open With dialog going forward. Note too the "Always use the selected program to open this kind of file." It's selected by default, so if you're not trying to change the association, make sure you uncheck it.

Published Jul 07 2008, 10:59 AM by pthurrott
Filed under: ,

Comments

 

Flenser said:

You don't need to hold down shift when you right-click. The Open With option is always available.

July 7, 2008 9:34 AM
 

johnbaxter said:

The shift key isn't necessary with right click in order to have "Open with..." in the menu.  Shift does add other useful things, however, including the "Pin to Start Menu" you told us about before (Thanks!) , "Add to Quick Launch", "Open read only" (presumably only for a document, not an app).  The menu on my machine is over an inch taller with shift than without.

Right click for Open with also works in the old "who cares any more?" version of Windows.  I could easily be convinced that it was in Win 9x--I learned about it long ago at the local computer club meetings.

All that aside, it's really useful.

July 7, 2008 9:47 AM
 

amanzi said:

The big difference is that it's difficult to remove a file association in Vista using the GUI. For example, a while back I accidentally set Notepad to open *.ISO files. So all the ISO files had the little Notepad icon. I couldn't figure out how to remove this association, but I also didn't want to replace it with another association. That tip you provided would have worked in this case - useful little utility!

>assoc /?

Displays or modifies file extension associations

ASSOC [.ext[=[fileType]]]

 .ext      Specifies the file extension to associate the file type with

 fileType  Specifies the file type to associate with the file extension

Type ASSOC without parameters to display the current file associations.

If ASSOC is invoked with just a file extension, it displays the current

file association for that file extension.  Specify nothing for the file

type and the command will delete the association for the file extension.

July 7, 2008 3:48 PM
 

BrightrevCarl said:

This is actually a really cool tip.  I've had file associations break on me and had a really tough time fixing them.  Adobe PDF seems to be a particular culprit, with Acrobat 6, 7 and 8 and Adobe Reader 7 and 8 - sometimes in upgrading it just stops wanting to work right.  Being able to just remove the association and start over is definitely a benefit.

July 7, 2008 3:53 PM
 

jono1 said:

Is there any way in VIsta to get back the functionality to choose programs for different actions in the right click menu?

For example, in XP I used to be able to set the default action for a .png file to open with Windows Picture and Fax Viewer, but have an option in the right click menu called "Edit" which would open it in Adobe Fireworks. I can't see any way to do that in Vista.

July 7, 2008 6:46 PM
 

Sir_Timbit said:

Is that per user, or would the assoc command set it for all users?

July 7, 2008 6:58 PM
 

lotsamystuff said:

Ah, used this very tip this morning, setting up some brand-spanking new Vista machines to use the preferred media player rather than the crap bundled one. The seminar facilitator I was working with was almost in a panic. It should come as no surprise that my Vista skills aren't up to par yet, so this was perfect timing. Thanks, Paul.

July 8, 2008 1:39 PM
 

And He Blogs » Blog Archive » links for 2008-07-08 said:

Pingback from  And He Blogs  » Blog Archive   » links for 2008-07-08

July 8, 2008 1:49 PM
 

WrapUp: iPhone 3G Unboxed, Thunderbird Vulnerabilities, and More said:

Pingback from  WrapUp: iPhone 3G Unboxed, Thunderbird Vulnerabilities, and More

July 8, 2008 5:20 PM
Acceptable Use Policy

About pthurrott

Paul Thurrott is the guy behind the SuperSite for Windows. Way behind. :)
SPONSORED LINKS FEATURED LINKS

EMC SAN vs. DAS Exchange 2007 CalculatorCalculate your savings now! Let Your Users Reset Their Own Passwords: Free Download Try a 30 day free trial of Desktop Authority Password Self-Service – it provides an easy-to-use, robust system for allowing users to reset their own forgotten passwords or locked accounts. Disaster Recovery Strategies – Tips and TricksDetermine how you can achieve your DR objectives as simply and cost-effectively as possible. Get Windows IT Pro & Mark Minasi’s Favorite Power Tools GuideOrder Windows IT Pro now and get "More of Mark Minasi's Favorite Power Tools"--a in-depth guide to the most useful Windows commands --FREE with your paid order! Subscribe today, and save 58% off the cover price! Migration, Virtualization, Availability, and Desktop ManagementRealize the importance of a workload optimization strategy...it can affect your bottom line! Deep Dive into VMware vSphere, eLearning SeriesJoin John Savill to explore the major functionality capabilities of the vSphere virtualization platform, including identification of the changes from ESX 3.5.
Windows IT Pro |  Subscribe |  Register |  FAQ for Windows |  Media Kit |  WinInfo News |  Europe Edition |  About Us |  Contact Us/Customer Service |  Affiliates/Licensing
SQL Server Magazine |  Office & SharePoint Pro |  WinDevPro |  asp.netPRO |  IT Library |  Technology Resource Directory |  ITTV |  IT Job Hound

© 2009 Penton Media, Inc.     Terms of Use | Privacy Statement | Reprints and Licensing