07-03-2025 10:17 AM
PC is running Windows10.
I'm usingLabVIEW 2017.
I have installed PdfCreator v, 4.4.0 (free version).
When i run
PDFcreator-cli.exe
from a Windows shell, I got:
But if I run the same sw using "System Exec.VI" I got:
Can anyone give me some hints?
07-03-2025 11:42 AM - edited 07-03-2025 11:43 AM
Have you tried putting 'cmd /c' at the beginning of the command line input?
07-03-2025 12:41 PM
You could use the example that is provided by NI:
I believe aputman is correct on the need for cmd /c to make this work.
07-04-2025 02:43 AM
Ty aputman.
I think you are right, but putting "cmd /c" before the .exe name, don't change the result.
07-04-2025 03:13 AM
Hey aeastet.
I forgot to check the examples!
Anyway, I posted a simplified version of the problem.
LabVIEW create a batch file (.bat), in which some files are moved in a folder, and then PDFCreator-cli.exe merge some .pdf files.
LabVIEW call System Exec.vi to run the batch file.
When I run LabVIEW .vi, i got that files are correctly moved as I expected, but .pdf are not merged.
The call to System Exec.vi, always return in standard error:
Unhandled Exception: System.IO.IOException: The handle is invalid.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
at pdfforge.PDFCreator.UI.CLI.Program.ConfigureParser()
at pdfforge.PDFCreator.UI.CLI.Program.<Main>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at pdfforge.PDFCreator.UI.CLI.Program.<Main>(String[] args)
Running the batch file manually, doubleclicking on it, always works fine.
bye
In the standard error output there is always the same message:
07-04-2025 06:37 AM
Add the correct path as Start/default folder. Since Windows 7 it's been pickier about that.
07-07-2025 05:22 AM
Hi Yamaeda,
I don't know exactly what "correct path" mean, but I think that the problem can be related to access privileges to system folders..., so I tried copying the full tree of
c:\program files\PDFCreator
to
d:\PDFCreator
Then i ran the PDFCreator-cli.exe from the new path, but I got the same error.
ty
bye
07-07-2025 10:57 AM
Other alternative to consider:
1. Create a batch file, put your command in it. Make sure it works in Windows. Call the batch file using System Exec.vi
Or
2. Create a shortcut, configure it properly (for example: run as admin, etc.). Call it in System Exec.vi.