12

I am running Notepad++ v.5.9.2 on Windows 7-64 bit. When I try to launch files in IE or Firefox from the Run menu in N++, there's no problem. However, when I click "Launch in Chrome" nothing happens, even though I have Chrome 12 installed on my system (and it runs fine outside of Notepad++).

I tried to modify the path to Chrome in the N++ shortcuts.xml file found in the following line: "chrome "$(FULL_CURRENT_PATH)"". I tried replacing $(FULL_CURRENT_PATH) with the full path of the chrome.exe file on my machine, but it still doesn't work.

Does anyone know how I can fix this problem so that when I click on Run>Launch in Chrome the file will actually launch in Chrome like it does in IE and Firefox?

8 Answers 8

6

While browsing another unrelated Notepad++ answer, I came across something that helped me to figure out how to work around the problem (thanks jweede!!) Here is the documentation.

  1. Under the Run menu, click Run.
  2. Browse to wherever your Chrome executable is, mine is in C:\Users\(current user)\AppData\Local\Google\Chrome\Application\chrome.exe This path will now appear in the box.
  3. Put quotation marks around the entire path AND a space after the last quotation mark (important)! Then type "$(FULL_CURRENT_PATH)"in the box, after the space.
  4. Click "Run" in the dialog and it should open your current Notepad++ file in Chrome. If all is well, click "Save" and name your new shortcut and assign a keyboard shortcut.
1
  • Thanks! The final run command for Firefox is then: "C:\Program Files\Mozilla Firefox\firefox.exe" "$(FULL_CURRENT_PATH)" Jul 27, 2021 at 10:42
4

Why did you try replacing the FULL_CURRENT_PATH part? This is for the currently opened text file.

Replace the "Chrome" part with the place where Chrome is.

Example:

<Command name="Launch in Chrome" Ctrl="yes" Alt="yes" Shift="yes" Key="82">&quot;c:\Documents and Settings\<username>\Local Settings\Application Data\Google\Chrome\Application\chrome.exe&quot; &quot;$(FULL_CURRENT_PATH)&quot;</Command>

Please focus the additional "&quot;" I put there. These are there because the path to Chrome contains spaces.

Example when used in cmd:

C:\>c:\programme\internet explorer\iexplore.exe
Der Befehl "c:\programme\internet" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

C:\>

I am using German Windows and it says it can't find the command "c:\programme\internet". It thinks the command I am trying to run is "C:\Programme\Internet" with a parameter of "Exporer\iexplore.exe"

C:\>"c:\programme\internet explorer\iexplore.exe"

C:\>

This runs Internet Explorer instantly. The reason nothing comes up is that Internet Explorer just doesn't write anything to the console when starting.

3
  • @sinni800--Thanks. I thought I had fixed the chrome line in shortcuts.xml to look exactly like the command line you gave me, but it turns out I was missing the space between the path end quote and the beginning quote for $(FULL...) It doesn't work without the space!!
    – terrytek
    Jul 6, 2011 at 14:57
  • @sinni800--I had deleted the original "Launch in Chrome" command (which was stupid) when I did the solution below. After I did a clean reinstall to get that item back, putting code<Command Key="82" Shift="yes" Alt="yes" Ctrl="yes" name="Launch in Chrome">"C:\Users\Terese\AppData\Local\Google\Chrome\Application\chrome.exe" "$(FULL_CURRENT_PATH)"</Command>code STILL doesn't work, and I don't know why.
    – terrytek
    Jul 6, 2011 at 16:28
  • Really, I don't know why...
    – sinni800
    Jul 7, 2011 at 10:00
3
  1. Copy a Google Chrome shortcut icon into the Notepad++ folder

  2. Rename it chrome

You will need admin approval.

enter image description here

0
1

Normally, Notepad++ wouldn't need the path to chrome anyway, because the Chrome installer should have added an entry to the registry under the App Paths key:

On Windows XP (and I'm assuming it would work similarly on Windows 7):

REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe"

Should report:

Path        REG_SZ  C:\Documents and Settings\<username>\Local Settings\Application Data\Google\Chrome\Application
<NO NAME>   REG_SZ  C:\Documents and Settings\<username>\Local Settings\Application Data\Google\Chrome\Application\chrome.exe

On Windows 7 of course, that will be C:\Users\<username>

And on Windows 7, Chrome might be registered under the per-user App Paths key:
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe

But as long as these are in place, and point to the Chrome executable, Notepad++ should be able to run it, unless it uses some odd way of invoking programs.

1
  • While many of these solutions will work, this is probably the most correct answer here.
    – Steve Rowe
    Apr 24, 2012 at 5:42
0

It sounds like it might be a very small detail in the shortcuts.xml file. Does the chrome line look exactly like below?

<Command name="Launch in Chrome" Ctrl="yes" Alt="yes" Shift="yes" Key="82">chrome &quot;$(FULL_CURRENT_PATH)&quot;</Command>

Edit - Also, what exactly is the error? Is it providing an error message, silently doing nothing, or something else?

2
  • Yes, the Chrome line in the shortcuts.xml file looks just as you have it. There is no error message; it just silently does nothing.
    – terrytek
    Jul 6, 2011 at 0:07
  • @BenJones--Yes, the Chrome line in the shortcuts.xml file looks just as you have it. There is no error message; it just silently does nothing.
    – terrytek
    Jul 6, 2011 at 2:56
0

For me these not worked for windows 10. Then please Try this

View > View Current File in > Chrome.

Hope this helps.

-1

if above tips dont work then try this: Copy your path to Chrome(mine was C:\Program Files x86)\Google\Chrome\Application\chrome.exe). Now open your Notepad++ and press F5 or select Run option from Run dropdown menu and paste this path there in double quotes . Now put a space after ending quote and put the following after space $(FULL_CURRENT_PATH). IT SHOULD LOOK LIKE "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" $(FULL_CURRENT_PATH) . Now save this path with any name and shortcut keys u like .

and later u can open ur document using the shortcut keys or Run dropdown menu;

               THANK YOU
1
  • This duplicates another answer and adds no new content. Please don't post an answer unless you actually have something new to contribute.
    – DavidPostill
    Jan 9, 2016 at 20:05
-1

Easy fix

1- Save your HTML file. 2- Go to file explorer and look for it. 3- Select it and right click to bring the menu. 4- Choose open with and then pick your desire web app. Done.

1
  • 1
    This might be a fix - but it is unclear why it may be a fix. Please explain/clarify further? Thanks!
    – studiohack
    Feb 18, 2019 at 15:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .