Community
    • Login

    Win11, pork2sausage: CreateProcess / The directory name is invalid / Exception 1002

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 378 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • OpossumPetyaO
      OpossumPetya
      last edited by OpossumPetya

      I I just discovered pork2sausage plugin. wrote Perl program to use with it, tested on one machine (Win10) - works great.

      wanted to use it on another machine – same Npp version v8.5.4 64 bit (upgrade to 8.5.5 didn’t help), same plugins installed (I just use default npp export, mime tools, and converter). same perl ver, and same script. the only difference I can see is it works on Win10, and doesn’t on Win11.

      when I select my entry (the only one) in Pork to Sausage plugin submenu, I get a popaup dialog titled CreateProcess with message “The directory name is invalid.”, when I click Ok I get the next pop up dialog: titled Exception and message “1002”. and then the third popup - “no output”.

      I can’t figure out what can the problem be, or how to fix it :(

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @OpossumPetya
        last edited by PeterJones

        @OpossumPetya said in Win11, pork2sausage: CreateProcess / The directory name is invalid / Exception 1002:

        I can’t figure out what can the problem be, or how to fix it

        Unfortunately, all we can do is guess, especially since you gave us no concrete details.

        I am not on a Win11 system for now, so I cannot test the difference between OS… but here are some other generic hints:

        Your error message says the directory name is invalid. That means it probably has to do with the directories used in your pork2sausage.ini

        pork2sausage has two four modes: one where it’s using the external application’s STDIN and STDOUT, a second where it’s using an external file as the input to and output from the external application, and third with STDIN and fileout, and a fourth with file in and STDOUT.

        If you are using the second mode, like in the pork2sausage.ini zip2 example, then you need to make sure the temporary directory exists. The example c:\tmp directory doesn’t exist by default on any Windows system, so if you had created it on the Win10 but forgot to create it on the Win11, then the same rule won’t work. (Similarly if you are using the third or fourth mode, with only one external file instead of two.)

        But more likely, given that it was a CreateProcess that gave “The directory name is invalid”, I am guessing that a directory used for progPath or workDir or somewhere in the progCmd existed on your Win10 machine, but not on your Win11 machine. => Maybe you have perl in C:\strawberry\perl\bin\perl.exe on Win10, but in c:\perl\bin\perl.exe on Win11; if so then obviously you would need to change pork2sausage.ini to make sure it calls the right path to the perl interpreter. Or maybe on Win10, you have your file associations set up correctly so that you can just run c:\path\to\script.pl, but on Win11, you need to use c:\strawberry\perl\bin\perl.exe c:\path\to\script.pl because the associations are not set up correctly; if so, you will need to change the calling style in pork2sausage.ini (or fix your perl associations). Or maybe your username is slightly different on the two, so the script was in c:\users\possum\Documents\script.pl on one but c:\users\Opossum.Petya\Documents\script.pl on the other.

        These are just the first ideas I had for debugging. Good luck.

        1 Reply Last reply Reply Quote 1
        • OpossumPetyaO
          OpossumPetya
          last edited by OpossumPetya

          hey, than you very much for the reply!
          actually, I think I might have some issue with file system for the directory where the the program is :-/

          I just woke up and started playing with other cmd tools that just output stuff to stdout, and the output was returned to npp, so, I tried my initial tool, and just changed working dir – and it worked! (the original one working dir definitely exist)

          If u google this error text there are mostly two reasons described - no access rights, and problems with file system. access rights was definitely not an issue here (I also tried running npp in admin more), so I’m gonna run chkdisk or whatever the current tool in win11, and will see what happens

          thanks!

          1 Reply Last reply Reply Quote 0
          • OpossumPetyaO
            OpossumPetya
            last edited by

            so I ran the “scan disk” (which is chkdisk), it reported no errors, but now it works as it did originally. wow

            anyways, thank you @PeterJones , looks like I’m all good for now.

            P.S. btw sorry I didn’t mention in the original msg, I’m using stdin/stdout mode with my tool, just to complete the picture.

            1 Reply Last reply Reply Quote 2
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors