Win11, pork2sausage: CreateProcess / The directory name is invalid / Exception 1002
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 :(
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
twofour 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:\tmpdirectory 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
workDiror somewhere in the
progCmdexisted on your Win10 machine, but not on your Win11 machine. => Maybe you have perl in
C:\strawberry\perl\bin\perl.exeon Win10, but in
c:\perl\bin\perl.exeon 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.plbecause 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.plon one but
c:\users\Opossum.Petya\Documents\script.plon the other.
These are just the first ideas I had for debugging. Good luck.
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
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.