Quick fix for Notepad++ and the dreaded “Error in CreateProcess (740)” problem!

At least this worked really well for me, and a few other folk that tried it.  I don’t know if this is a Windows 7 thing since it seems that most folks experiencing this problem were running Win7, but not everyone.  Either way, I culled this from bits and pieces of other suggested solutions I found and thought I would share it.  You never know, it might help someone else like it helped me, and that’s what this site is all about, eh?

OK, on with the goodness!  Quick summary, I had Notepad++ (one badass text editor for Windows if you don’t already know about it) installed on my main machine, the Mothership running Windows 7.  I had a context menu entry so that I could write click on darn near anything and have the option to “Edit with Notepadd++”.  This has been a real handy option living in my context menu for years, and when it started flaking out I wasn’t happy about it.  At first I figured it was just Windoze being Windoh’s and it would be OK after the next time I rebooted.  However, as time went on, after the next reboot or two, it was still messed up.

Messed up how you ask?  Well, I could open the program with the standard shortcut, no problem.  Once open I could open files, no problem.  I could drag and drop files and Notepad++ would open them fine.  It was only when I tried to fire up Notepad++ with a file argument after the executable’s path (like the context menu) that I would get the following error message:

Error in CreateProcess (740): Is this command correct?
“C:\Program Files\Notepad++\notepad++.exe”

That was it, no joy after that.  Nothing.  Nada. Irritating.  Well, to make a longer story shorter, I did some research and found that it came down to two problems.  Maybe only one, but I think it really had to do with both.  These were/are:

  • Windows 7 (and maybe Windows in general, regardless of the version) doesn’t like the “++” in the path.  The theory goes that Windows doesn’t have a publicly reported problem, like by Microsoft, but nonetheless it sometimes just lets special characters get on its bad side, and starts throwing some errors.
  • Windows 7 (and maybe Windows in general, regardless of the version) does not like the Notepad++ option during setup that says don’t use %AppData% for storing config settings.  This allows you to override Windows default behavior and store your config data in the program directory like in the old days.  Well, Windows 7 especially (maybe others) really hates this, and will fight with you over it.

So, what was the fix?  The fix should be pretty obvious after reading the two items above, but I’ll lay it out for you anyway, cause that’s what I do!

  • First, uninstall Notepad++, make sure to completely remove it.
  • Next, re-install Notepad++, you might as well snag the latest version from their site (http://notepad-plus-plus.org/) while you are at it.
  • During the re-install, make sure you change the installation path so as to remove the “++” from the install directory.  As a suggestion, I used “C:\Program Files\NotepadPP\”, substituting a capital P for each +.
  • Also, as you are installing, make sure you do not check the option that says to not use %AppData%, go ahead and let the installer put the config files where it wants.
  • Now, once the install is done, test it out.  For me, this fixed my problems, Notepad++ runs faster and smoother than ever before, which is a great thing.

I sure hope this helps you fix the problems you are having with Notepad++ and opening files from a context menu.  If not, drop a comment and share some details, maybe we can get folk to chime in and help you out!  Enjoy 🙂

10 thoughts on “Quick fix for Notepad++ and the dreaded “Error in CreateProcess (740)” problem!

  1. Another way, is to edit the path to notepad++ in registry.
    1) type windows-key + R, then type “regedit”
    2) Find (^F), search for “notepad++”, type F3 to find all times it occurs in registry.
    3) change path to where notepad++ actually exists

  2. THANK-YOU so much for documenting this. This has been driving me nuts since I upgraded to Win7 (just last week). It was fine on Vista, btw.



  3. It obviously had the ++ problem, solved the problem by renaming the np++ folder to nppp and then changing the path in the registry and it was solved..

Tell me what you are thinking?