PhpStorm as default program for certain file extensions (Windows 7 64bit)

Hi,

I can't seem to set PhpStorm as the default program for any extension.
In Windows 7 (64bit) I right-click a file, then press 'open with' and 'Choose default program'. When I select C:\Program Files (x86)\JetBrains\PhpStorm 4.0.1\bin\PhpStorm.exe the screen reverts back to the 'Open with' screen without PhpStorm being selected.

Should I file this under the Issue tracker or am I missing something?

Kind regards,

Jasper

0
9 comments

Hi Jasper,

When you are back to "Open with..." screen (from "Browse" dialog) , PhpStorm should be listed under "Other Programs" section. If it is collapsed (for whatever reason) then just unfold it and find PhpStorm.

But in any case -- such behaviour has nothing to do with PhpStorm.

0
Avatar
Jasper van der Hoeven

Hi Andriy,

Thank you for your answer, however PhpStorm is not listed under the 'Other programs' section.
It seems it is a Windows issue but I'm wondering if there are other users who experience this issue.

Edit:
I used a little program called Default Programs Editor to solve my problem.

0

This definitely seems like Windows issue for me.

If I would have something like that I would do this workaround:

  • Grab this program (FileTypesMan -- free and safe) http://www.nirsoft.net/utils/file_types_manager.html
  • when launched, type ".php" (without quotes) to go to php file extension (on navigate manually by scrolling down)
  • in bottom grid create new entry for PhpStorm


In the end you will have separate entry in context menu (for .php files) that will be available straight away (no need to go under "Open with...") and you can mark that action as default one (the one that performed on double click).

0
Avatar
Jasper van der Hoeven

Thanks for your solution, it also works like a charm :)

Shouldn't PhpStorm do this for me during install? I have a friend who has exactly the same issue.

0

PhpStorm is built around must-have-project-defined idea/approach and is not that useful for editing random php files. Therefore such option is not making too much sense here (for majority of users, of course). For those who would like to actually using it this way -- well, they can create such action themselves -- at the end of the day "Open with" dialog is easy to use and works fine (well, not in your case, unfortunately).

0

This condition happens after an upgrade when the program installation directory changed (it has the version number in it) but there is a stale Applications entry left with the old path.

To solve it use Regedit to delete HKEY_CLASSES_ROOT\Applications\PhpStorm.exe. Then return to the "Open with..." dialog and select PhpStorm.exe - this time it will successfully be added to the list of applications.

You can also use the already mentioned FileTypesMan to find the entry - it's right at the top of the list (make sure Options -> Show Application Types is enabled).

0

This is the answer. In my case, PhpStorm 6 had been launching despite my telling Windows to launch PhpStorm 7 for .js files. Uninstalling both versions, and then installing the latest version, did not fix the problem. Deleting the registry key manually fixed it. This is clearly a bug in the way PhpStorm handles its setup.

0
This is clearly a bug in the way PhpStorm handles its setup

It is NOT. PhpStorm does not create or manage those entries -- it is completely unaware of them.

When you use "Open with" for a first time, Windows saves the path to the executable file (let's say (for example) "C:\Program Files\PhpStorm 6.0"). When you install new version, installer will offer to install it into different folder (e.g. "C:\Program Files\PhpStorm 7.0" or "C:\Program Files\PhpStorm 6.0.3"), unless you manually specify *another* folder name. But the record in "Open with" still points to the OLD location where no such file exist any more.

Simply speaking -- by always installing IDE into the same folder will cause this issue to never happen in first place.

0

For every other program on the system, I can right-click a file and choose Open With -> Choose Default Program -> Browse, then choose the program's executable, and it will work. The only program that has ever not worked is PhpStorm 7 when PhpStorm 6 was previously installed. Why does Windows (try to) open PhpStorm 6 when the executable I told it to use is PhpStorm 7? That sounds like something PhpStorm itself is doing--like running a previous version of itself or something.

0

Please sign in to leave a comment.