Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Windows XP / Vista / 7, it was simple to re-associate items away from the defaults in bulk by using ftype and assoc as below. This was an important time-saver in system setup to make sure that all associations are as the user wants, otherwise it is (very) time-consuming to re-associate each extension one at a time on new installations.

In Windows 8, none of this seems to work now. So for example, .pdf files are now by default associated with Microsoft's Metro app "Reader". To manually have to re-associate the many (10's or hundreds of file types) to standard desktop apps (e.g. .pdf should be associated with Adobe Reader, instead of Microsoft Reader) will be a chore on new Windows 8 installations. Below is an example of how I did this in Windows 7 using a cmd script, but obviously with the advancement of PowerShell it is probably more appropriate for this in Windows 8 (plus, I suspect access to .NET may be required to change these Metro associations, and cmd is a bad tool for that job).

I don't think that Metro apps are bad (on tablets they will be ideal), the problem is that they have massively limited functionality compared to the Desktop equivalents so it would be good to be able to re-associate everything quickly (scripted) to the Desktop apps (or also the reverse if I am working on a tablet and want everything associated to the Metro apps in that use case).

:: File assoc and ftype: RAR, ZIP, NFO, DIZ, CBR, CBZ, DJVU, etc
:: ####################
:: Note: at commandline, would type ftype txtNFO="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
:: but in batch script have to double up the % characters, ftype txtNFO="%SystemRoot%\system32\NOTEPAD.EXE" "%%1"
:: plus note the " characters, have to be careful about these
if exist "C:\Program Files (x86)\7-Zip\7zFM.exe" ftype 7zFM="C:\Program Files (x86)\7-Zip\7zFM.exe" "%%1"
if exist "C:\Program Files\7-Zip\7zFM.exe" ftype 7zFM="C:\Program Files\7-Zip\7zFM.exe" "%%1"ftype txtNFO="%%SystemRoot%%\system32\NOTEPAD.EXE" "%%1"
ftype txtDIZ="%%SystemRoot%%\system32\NOTEPAD.EXE" "%%1"
ftype QuickPAR="D:\Toolkit\QuickPAR\QuickPAR.exe" "%%1"
ftype CDisplay="D:\Toolkit\CDisplay\CDisplay.exe" "%%1"
if exist "D:\Toolkit\Microsoft Reader\msreader.exe"         ftype MSReader="D:\Toolkit\Microsoft Reader\msreader.exe" "%%1"
if exist "D:\Toolkit\Mobipocket Reader\reader.exe"          ftype MobiPocket="D:\Toolkit\Mobipocket Reader\reader.exe" "%%1"
if exist "D:\Toolkit\Stanza\Stanza.exe"                     ftype Stanza="D:\Toolkit\Stanza\Stanza.exe" "%%1"
assoc .lit=MSReader
assoc .mobi=MobiPocket
assoc .prc=MobiPocket
assoc .azw=MobiPocket
assoc .epub=Stanza
assoc .par=QuickPAR
assoc .par2=QuickPAR
assoc .sfv=QuickPAR
assoc .md5=QuickPAR
assoc .7z=7zFM
assoc .rar=7zFM
assoc .zip=7zFM
share|improve this question
Have you tried this on Windows 8? No sense in reinventing the wheel if it works. – uSlackr May 1 '12 at 16:18
Yes, this no longer works on Windows 8. Absolutely agree, I don't want to reinvent the wheel, but it doesn't work anymore, which was the main reason that I've posted this. Every possible file type has been associated with Metro apps by default, and it is a lot of work to alter that, and I honestly think that a lot of people will benefit from a good method to re-associate those items quickly to the Desktop apps when not working on a Metro tablet PC. Definitely using the ftype/assoc scripts that I've built in the past have saved a great deal of hassle when working with Windows 7 / Vista. – YorSubs May 1 '12 at 20:25
Could you explain what happens when you run the script? Errors? – uSlackr May 2 '12 at 11:07
Nothing happens really. It's almost as if association with Metro ignores all of this, which makes me think that a different process is controlling these associations in Windows 8. Hence, probably PowerShell would be the way to do it. By default, all file types are associated with the Metro apps, so avi with Video, mp3 with Music, pdf with Reader etc. Those Metro apps are ok, but very visual and limited in functionality compared to the Desktop equivalent. It would be very useful to bulk re-associate the many file types to the Desktop equivalent apps in a single script action. – YorSubs May 3 '12 at 11:46
Any luck with this? – bdwakefield Feb 1 '13 at 5:07

You must log in to answer this question.

Browse other questions tagged .