Lazarus
Programming => General => Topic started by: nikel on October 29, 2020, 11:06:39 am
Title:
Need help with external process
Post by:
nikel
on
October 29, 2020, 11:06:39 am
Hello, I'm trying to run a program in command line on Windows. This works fine:
Code: Pascal
[Select]
[+]
[-]
if
RunCommand
(
'ffprobe'
,
[
'-loglevel error -show_entries format_tags='
+
Request
+
' -of default=noprint_wrappers=1:nokey=1 '
+
'"'
+
Path
+
'"'
]
,
Str
)
then
begin
But this doesn't set any value:
Code: Pascal
[Select]
[+]
[-]
if
RunCommand
(
'ffprobe'
,
[
'"'
+
Path
+
'"'
]
,
Str
)
then
begin
How can I execute an external command and get the output on Windows?
Title:
Re: Need help with external process
Post by:
marcov
on
October 29, 2020, 11:53:31 am
- No quoting
- pass multiple parameters as a list
so
RunCommand('ffprobe',['-loglevel','error','-show_entries format',.....
etc
Title:
Re: Need help with external process
Post by:
nikel
on
October 29, 2020, 04:59:49 pm
Thanks for the reply.
TinyPortal
© 2005-2018