Menu

NppExec plugin error

2007-04-06
2012-11-13
  • Idris Samawi Hamid

    Hi,

    I installed the NppExec plugin, but nearly every command I try give me

    "CreateProcess() failed"

    For example, just DIR or

    CD "C:\"

    does this.

    Or executing explorer.exe

    gives me

    Process started >>><<< Process finished.

    but no explorer appears. What am I doing wrong?

    Best
    Idris

     
    • DV

      DV - 2007-04-10

      explorer.exe is not a console application. You must call it this way:

      npp_run explorer

      The difference between commands with npp_run and without it is the following:

      1) when you type "npp_run <executable>" the plugin uses WinExec() function (look in Win API documentation)

      2) when you type "<executable>" (without npp_run prefix), the plugin uses CreateProcess() function (look in Win API documentation)

      For example, type this:
      calc
      and press Enter. You will see "Process started >>>" until you close the Calculator. Then you'll see "<<< Process finished".
      Now type this:
      npp_run calc
      and press Enter. You will not see "Process started >>>" because with "npp_run" the Calculator is started as external process (with WinExec) and the plugin does not handle it.

      Talking about your questions - it is just a behaviour of system function CreateProcess() and I can not change it.

       
    • Idris Samawi Hamid

      Hmm, Maybe I just don't understand editor-inline consoles that well: declaring

      foo.bat

      works but declaring

      make

      does not; both work with Run and with the command line. Similarly my lnk files, activated in the control panel, eg,

      Acrobat.lnk,

      work with Run but not with the console. What am I missing here?

      Best
      Idris