Windows “Open With” application not appearing as an option

Solution 1:

After some googling I found an answer along with other forums with no sufficient answer so I thought this would make for a helpful post.

STEP 1

First you need to get the associated name of your file type. In the command prompt (be sure to run as Admin) run the following

  • assoc {filetype}

    For example:

    • assoc .php

      Should output .php=phpfile <- this is what you need for the next part

STEP 2

Once you have the filetype association that you would like to change you will run the ftype command on it

  • ftype {file_association}="absolute-path-to-application" "%1"

    For example:

    • ftype phpfile="C:\Dropbox\ST3\sublime_text.exe" "%1"

That command effectively added Sublime Text as a recommended application for phpfile type associations. Now when I use the normal windows methods for settings a default application it appears without even having to browse for it.

SUCCESS!

Full description can be found here

BONUS POINTS:

If you get a response like the following: File association not found for extention then you simply need to create an association for that extension with the following:

assoc .{XXX}={filetype}

For example:

assoc .cls=javaclass

Once the association is made which you can verify using the steps above, then you can proceed with associating it to a default application.

Solution 2:

TFeldt posted this solution in the Sublime Forum (link):

  1. Open
  2. Navigate to HKEY_CLASSES_ROOT\Applications\sublime_text.exe\shell\open\command Verify that the path is accurate, correct it if it is not. Exit regedit.
  3. Open task manager via ctrl+alt+del, kill explorer.exe, go to run and type explorer.exe (or skip this step and simply reboot).
  4. Now attempt the same thing, right click a text file, open with, navigate to sublime, and it should now appear in the list of available applications.

The problem that I had was that the path wasn't updated when I changed to ST3 from ST2.