ever since i upgraded PHPstorm the file association to it has been lost so when i go to the Open With setting to change which program a .php or .xml file opens with, when i go to browse and select C:\Program Files (x86)\JetBrains\PhpStorm 6.0\bin\PhpStorm.exe and hit open it doesn't appear in Other Programs or Recommended Programs and when i hit OK it just associates the original program it was associated with (which happens to be the selected)

this problem isn't just PHPStorm, it happens with Notepad++ since as an alternative i can associate a .php file with notepad++ but it does the exact same thing

i am wondering what's going on and if there is an alternative way to associate files with programs

NOTE: this only happens on my workplace PC, it has never happened on C.C (Home/Gaming/Personal Work PC)

  • 1
    In the registry what do you see under HKEY_CLASSES_ROOT\.php\OpenWithList and HKEY_CLASSES_ROOT\.xml\OpenWithList? – Karan Mar 21 '13 at 19:51
  • for php its (Default) | REG_SZ | php_auto_file, for xml, there's nothing but a sub folder called winword.exe and in that it has (Default) | REG_SZ, that's how i got the open with working last time when i was using PHPStorm 5 but i dont want to have to keep going into the registry and change stuff every time i upgrade PHPStorm or for another program, Pat's method may require messing with the registry but it's only 1 key i have to change if i upgrade – Memor-X Mar 21 '13 at 21:10

Since you tagged the question with Windows 7, I'm guessing you have Windows 7. If you want to continue using the "Open With" context menu, then create a shortcut of the program you use a lot, and place it here:

C:\Users\<your username>\AppData\Roaming\Microsoft\Windows\SendTo

Just replace your username with the foldername that corresponds to your Windows logon username.

Edit: If you want to create a special context menu option which will be static and outside of the "Send To" submenu section, you can add the below code to your Registry. Open Notepad and paste this below in, then save it as OpenWithPHPstorm.reg. I use this code for a Static notepad.exe context menu

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Open with PHPstorm]

[HKEY_CLASSES_ROOT\*\shell\Open with PHPstorm\command]
@="c:\path\to\phpstorm.exe %1"

Edit 2: You could also try right clicking on a phpstorm file, Selecting Properties, and then selecting Change... next to "Opens With", then find and select PHPstorm. This is another way to try and force the association.

| improve this answer | |
  • that works but considering that i have a bunch of other programs that's added stuff to the right click menu and the send to menu has a crap load of network drives on it phpstorm will eventually get lost, i would like to know what the problem is – Memor-X Mar 21 '13 at 3:30
  • I'm not familiar with phpstorm, so not sure what's wrong with it. I've edited my answer with another potential solution you could try. – Pat Mar 21 '13 at 3:36
  • Properties -> Open with doesn't work either, think the problems likes in the window which lists the programs to open with, the registry solution was a better open since it's near the top, would i be right to guess if i did HKEY_CLASSES_ROOT\*\shell\Common Programs\Open with PHPStorm\command i could create an option called Common Programs which opens a sub menu with PHP Storm, like i said before, the problem isn't just PHPStorm, Notepad++ does the same and who knows how many others – Memor-X Mar 21 '13 at 3:53
  • My own opinion of this answer is it's just a patch, a work around. It does not fix the issue. See below for what fixed it for me. – MotherDawg Sep 18 '18 at 18:42

I was having the same problem. What I did to fix this was searched in regedit for "php" and eventually i noticed a value that was reflecting the location of the first version of phpstorm was but the location is invalid and because of this, it wont add to the open with context menu. Just find it and update the value and you should be good to go

| improve this answer | |
  • 1
    This worked perfectly for me also. In the registry, the entry for Phpstorm.exe/shell/open/command had "C:\Program Files (x86)\JetBrains\PhpStorm 4.0.1\bin\PhpStorm.exe" "%1" I changed the 4.0.1 to 6.0.2 and Phpstorm then showed up in the recommended programs list. – tcrosley Sep 2 '13 at 17:47
  • you'd hope this kind of thing would be something the developer would change rather than having to do it manually every time you update phpstorm – andyface Jan 24 '14 at 17:21

If your program/app is installed to somewhere other than "Program Files" Windows 7 has trouble including it in these lists. It's usually better to stick with OS defaults.

| improve this answer | |
  • 1
    Wouldn't you know? A post that actually points toward a cause. Personally, both "Program Files" on the system drive is for windows stuff. I never install anything in there. For system related apps, I create a folders named "Programs" on the system drive. I install all other apps to a second drive. See below for the fix that worked for me. THX Ropata – MotherDawg Sep 18 '18 at 18:48

Have you tried using "Default Programs" to change the file-type association? I'm assuming you're on Windows Vista or above:

Open up Default Programs by clicking Start and typing Default Programs. Click on "Associate a filetype or protocol with a program".

Once that finishes discovering filetypes, select the file type you want to change the default program for and select "Change program". Choose the program from the list and Accept.

| improve this answer | |
  • just tried it however it's still doing the same, for both PHPStorm and Notepad++ – Memor-X Mar 21 '13 at 3:09

I have the same problem today, here is how I fix the issue. run regedit, and search the application name, you wiil see the one of the result in HKEY_CLASSES_ROOT\Applications\"your exe".exe\shell\open\command\ then change the default value back to the absolute directory to your exe, eg: "D:\AA\bb.exe" "%1"

that's it.

| improve this answer | |
  • As you say Zdong, That Is It !!! - For what ever reason, there was no path to executables, just the names of the executable itself. I added the paths and voîlà! The applications are now appearing as options in Windows' “Open With” dialog and it now saves the associations. -- Zdong, Your tha man! THX Dude. – MotherDawg Sep 18 '18 at 18:53

I faced same issue, when i installed Notepad++ 64 bit over my Notepad++ 32 bit program.

i tried removing Notepad++ 64 bit and reinstalling it, rebooting. but it didnt helped.

Then i downloaded and installed Piriform CCleaner application. The inside that application i clicked Registry >> Scan For Issues >> Fix all Issues.

i did above step 2-3 times and now i can see Notepad++ 64 bit in Open with options

| improve this answer | |

I was having the same issue as @David Illescas with notepad++, but having the opposite situation (x64 version over the x86 one). His answer helped me find the solution, by simply replacing Program Files (x86) by Program Files in the HKEY_CLASSES_ROOT\Applications\notepad++.exe\shell\open\command key.

| improve this answer | |
  • May be in need of comment conversion. – Pimp Juice IT Jul 11 '17 at 14:24
  • I wanted to comment, but it says I must have 50 reputation ! – Youssef Jul 11 '17 at 21:11
  • You should be able to press flag and then the option in need of moderator intervention and then ask them to convert to a comment I suppose. This popped up in the review module for being such a short answer so I looked at only the answer without seeing all the other answers from this post but there are a lot of short answers here. Maybe your answer is fine on this old question, I'll let others decide that though; that was just a comment and guess what.... I may be wrong so move forward how you please but work on getting your rep up so you can comment, poke around the site, Help, etc... – Pimp Juice IT Jul 11 '17 at 22:46

In my case I unninstalled de x64 version of notepad++ and reistalled the x86 one. This broke my "open with". So I edited HKEY_CLASSES_ROOT\Applications\notepad++.exe\shell\open\command and changed the entry with the current path of the executable.

| improve this answer | |

I was having the same issue... I finally figured out a quick solution to it which seemed to fix it not showing up on the "Open With" tab. Please follow my steps below.

  1. Navigate to C:\Users\<Your User>\AppData\Local\Microsoft\WindowsApps (while replacing <Your User> with your Windows account user).
  2. Once there, minimize that folder and then open up a new explorer window.
  3. In that explorer window, navigate to either C:\Program Files (x86)\Notepad++ (64-bit) or C:\Program Files\Notepad++ (32-bit).
  4. Then, select and right click notepad++.exe. Navigate to Send To and left click Desktop (create shortcut).
  5. Navigate to your desktop and find a shortcut called notepad++.exe.
  6. Right click it and press copy (or select it and hold down Ctrl + C).
  7. Navigate back to the C:\Users\<Your User>\AppData\Local\Microsoft\WindowsApps directory we talked about earlier.
  8. Select an empty space in the folder; right click and press Paste. (Or hold down Ctrl + V in the folder)
  9. Now, right click that notepad++.exe shortcut.
  10. Select Run As Administrator
  11. Once open, click Settings and then Preferences.
  12. Navigate to File Association.
  13. You will now need to select each file type and click -> in order to add it under Registered Extensions.
  14. Make sure that you do Step 13 as many times needed for all file types listed (or at least the ones which you want to be opened in Notepad++)
  15. Now close Notepad++.
  16. Go to your desktop; right click and select New. Left click Text Document and rename it to something random. (We're not putting anything in it, it's just a test to see if you can open it in Notepad++)
  17. Right click the new text file and right click. You should now see a menu there that says Open In Notepad++.
  18. If that menu isn't there, repeat these steps or set the default programs by following this guide and setting Notepad++ as the default .txt extension.

Hopefully this worked for you! If it helped, please press the Grey ^ button beside this post to left others know that it helped you. If you have any tips for me on how I should edit this post, feel free to reply!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.