notepad++ will not run my files any longer
Since I updated Firefox to version 60.0 I have had numerous issues with this install. I've resolved many of them, but this one is still bothering me and I cannot find an answer online.
When in Notepad++, version 7.5.6, 64-bit, I click on the Run tab and select 'Launch in Firefox'. I now get a 'ShellExecute - ERROR code 2', showing that the specified file cannot be found. I'm absolutely certain the file is located where it shows it should be, so I don't know what's happening here.
I contacted the chat resource for the Notepad++ group and was told that it is a problem with Firefox v60.0, but they didn't know how to fix it and advised I just switch to another browser. I'd rather stay with Firefox, but with the installation of this most recent version - I'm starting to question whether I should.
Anyone have an idea how to get Notepad++ to launch in Firefox 60.0?
Thanks
All Replies (6)
I never noticed that menu before... I use File > Open in Default Viewer to launch HTML files from NPP.
But if Firefox is not your default browser, hmm, what is going wrong here.
Perhaps you need to use the full path. This worked for me based on a tip in https://notepad-plus-plus.org/communi.../launch-in:
(1) Open the NPP folder here:
- shortcut path: %APPDATA%\Notepad++
- full path: C:\Users\your_user_name\AppData\Roaming\Notepad++
Since AppData is a hidden folder, consider: https://support.microsoft.com/en-us/help/14201/windows-show-hidden-files
(2) Find the full path to your Firefox executable. Either:
- right-click your desktop shortcut and click Properties
- right-click your pinned Taskbar icon, then right-click Mozilla Firefox on the lower part of the menu, then click Properties
Windows should show the Shortcut tab by default, or click that tab.
Select and copy the entire Target field.
(3) Open shortcuts.xml in NPP and find the line for Firefox. Select the word firefox and paste the full path so that line ends up looking more like this:
<Command name="Launch in Firefox" Ctrl="yes" Alt="yes" Shift="yes" Key="88">"C:\Program Files\Mozilla Firefox\firefox.exe" "$(FULL_CURRENT_PATH)"</Command>
Your exact path will vary depending on whether you migrated a 32-bit Firefox to 64-bit. Or in other words, it might be:
<Command name="Launch in Firefox" Ctrl="yes" Alt="yes" Shift="yes" Key="88">"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" "$(FULL_CURRENT_PATH)"</Command>
Note: if your shortcut has additional parameters, you probably do not want to include those when setting up the path in shortcuts.xml.
Save the file. I had to restart NPP and re-do the edit once before it worked. I'm not sure exactly which steps are needed, but now it's fine.
Modified
Thanks for the suggestions; however, they did not work. I continue to get the error code 2 message when trying to RUN the page I'm working on in Notepad++. For clarification, I am clicking on the RUN link at the top of the Notepad++ application and not opening up a separate RUN command dialog box.
If the dialog still shows the Command as only the word firefox -- as in your earlier screenshot:
-- then the change to shortcuts.xml did not take. I know I had to try a couple times for some reason.
Thank you. I first edited the shortcuts.xml file found at the location: C:\Program Files\Notepad++\shortcuts.xml This did not solve the problem. I looked online and found there is actually another path to another file named shortcuts.xml - found here: Windows 7/8/10: C:\Users\<username>\AppData\Roaming\Notepad++ I edited and saved that file and the issue has been resolved.
Whoops, I meant to connect the dots between my step #1 and #3, but I can see now that I didn't. Sorry about that. Please pick one of the replies (yours or an earlier one) as the solution to close out this thread. Thanks.