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

About pthurrott

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

Free Download –VS 2008 TrainingExperts Ken Getz & Robert Green plus labs, code, courseware Maximize speed, performance and reliablity of your PCs and servers—automatically!Speed Up Your PC! Try Diskeeper 2008 with InvisiTasking Free Now! Register for SolarWinds VM MonitorGet X-Ray Vision into Your ESX Servers with SolarWinds FREE VM Monitor GoGrid Offers FREE Trial for Windows Cloud ServersDeploy Windows Server 2003 and 2008 with free load balancing through GoGrid’s award winning web-based GUI – all in less than 5 minutes Order Your SQL Fundamentals CD Today! Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD. How healthy is your Exchange Server? Find out Now!Automatic Exchange Server Maintenance helps prevent disasters and improves performance. Download a FREE Exchange Server analysis tool. You've Deployed SharePoint...Now What?This one-day free online conference delivers the technical knowledge needed to kick MOSS up a notch. In one information-packed day, independent SharePoint experts will present practical, real-world information and provide take-away, ready-to-use solutions Ease Your Scripting Pains with the Flexibility of PowerShell!Paul Robichaux equips you with PowerShell basics in 3 introductory lessons, each followed by live Q&A—all on your own computer! Register today! What Would You Do If You Ran Microsoft?ITTV's 2008 inaugural video contest, "If I Ran Microsoft..." is your chance to tell it like it is. Be goofy or be serious, but don"t miss this chance to have fun, win prizes, and go viral in a major way. Maximize Your SharePoint InvestmentThis web seminar discusses how true bi-directional replication of SharePoint content from one server to another enables branch offices to maintain access to current SharePoint content. Rock Your Knowledge, and Compete with Friends and Colleagues!Are you the Web Application Performance Guru in your office? It's time to have fun! Download now to access the crossword puzzle. Challenge yourself and complete this fun activity!
Windows IT Pro |  Subscribe |  Register |  Windows FAQ |  Media Kit |  WinInfo News |  Europe Edition |  About Us |  Contact Us/Customer Service |  Affiliates/Licensing
SQL Server Magazine |  Office & SharePoint Pro |  Windows Dev Pro |  IT Library |  Technical Resources Directory |  Windows Excavator |  ITTV |  IT Job Hound

Copyright © 2008 Penton Media, Inc., All rights reserved.  Terms and Use | Privacy Statement | Reprints and Licensing