You are here: PSPad forum > English discussion forum > Re: Can't open PHP files by double clicking in Windows Explorer

Re: Can't open PHP files by double clicking in Windows Explorer

Goto Page: Previous1 2

#11 Re: SOLVED! Re: Can't open PHP files by double clicking in Windows Explorer

Posted by: larryg | Date: 2012-02-04 12:32 | IP: IP Logged

PSPad,

If it were that easy to fix, I would not be here looking for help.

My troubleshooting suggests that the Windows Association software routine is failing to append the %1 calling parameter on file associations - which is why I get an empty file when Windows performs an association. I don't know why Windows isn't doing it - but I can confirm that it is not.

When I use this utility, I can see the missing %1 parameter and add it... which is when PSPad starts working.

-larryg

Options: Reply | Quote | Up ^


#12 Re: Can't open PHP files by double clicking in Windows Explorer

Posted by: OlgaSh | Date: 2012-02-29 10:16 | IP: IP Logged

Hi.

First of all - thank you for your amazing code editor, simply amazing.

Second - regarding this opening files, I did some research now on my comp and this is what I found:

1. It's not about registered file types. Not everything of it is, I mean. It is more about being admin or not, and the damn security model of Windows 7.

2. I tried editing the registry (for %1), installed 4.5.7 - nothing helped.

3. What I found, was the following: I usually run PsPad from a shortcut on my taskbar, and I marked it there to always run with admin rights. Yes, when then I run it, it always gives me that notification if I agree that this program will make changes to this computer, and I say yes.

The reason for that is that I did some my customizations for PsPad, adding scripts, and without admin rights the scripts wouldn't work, wouldn't be allowed to write.

But then I pay attention, that when I try to open a file from Windows Explorer into PsPad by double-clicking on it, it would do nothing.

Same happens, when I drag the file from Windows Explorer to PsPad - it doesn't open it. Choosing in the context menu PsPad doesn't work, either, even for simple txt files.

I registered the file type several times: in highlighters, in registered types in Program settings, in Windows file type association, in Windows context menu "choose default program" - the results are the same.

When I copy the full file path to the clipboard and then open the file in PsPad File > Open, it opens it. And when I choose the file inside the File Explorer in PsPad, it opens it, too, and knows how to highlight the contents.

And now I just double-clicked in Windows Explorer, when PsPad was closed - and it opened together with the file! I dragged another file from Windows Explorer - and it opened it, too! Then I thought, that it got something to do with the admin rights and I checked it: indeed, the scripts didn't work, couldn't write. When I reopened PsPad with that same taskbar shortcut, it got back to allowing scripts and not opening the files.

So what I guess is happening is: when PsPad is open with admin rights, it doesn't open the files "from the outside". But what can I do if I do need my scripts to run?

Could you please resolve it?

Thank you very much!
Olga.

Options: Reply | Quote | Up ^


#13 Re: Can't open PHP files by double clicking in Windows Explorer

Posted by: pspad | Date: 2012-02-29 11:55 | IP: IP Logged

1. download latest 4.5.7 from the PSPad developer forum
2. go to program settings / registered file types. Add .php and register extensions

Options: Reply | Quote | Up ^


#14 Re: Can't open PHP files by double clicking in Windows Explorer

Posted by: smr | Date: 2013-07-25 21:34 | IP: IP Logged

Hello,

I had the same issue on Xp SP3, with .php, .inc files where Pspad starts when double-clicking on these files but without displaying content in it with last version of Pspad (it was ok with old versions!!). Here is how I corrected that beneath some googling about "c:\Program Files\PSPad editor\PSPad.exe" "%1" . I found that we must not only register the Pspad program as default to Open and Edit the target file (add the "%1" suffix in the HKEY_CLASSES_ROOT\phpfile\Shell\Open\Command and Edit command), but for some file extensions (.php is concerned!), in HKEY_CLASSES_ROOT\ group, we must also add the "%1" suffix in the HKEY_CLASSES_ROOT\php_auto_file group for Open and Edit commands. Not all file extensions have these auto_file group!

I presume everybody knows how to edit a key by selecting "Run" then type regedit then click "OK", then select HKEY_CLASSES_ROOT and expand it, or just select Edit/find... menu and look for pspad keys, then press F3 until you find the php_auto_file group.
Do the same for other extensions you like.

Options: Reply | Quote | Up ^


Goto Page: Previous1 2





Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR