Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
Need help with external process
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
IRC channel
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
reading data from a text ...
by
speter
[
Today
at 06:31:59 am]
TProcess without freezing...
by
Edson
[
Today
at 04:55:24 am]
TFPHTTPClient holds the l...
by
trev
[
Today
at 04:52:54 am]
My hex viewer project com...
by
FlierMate
[
Today
at 04:35:26 am]
How to access GPIO on RPi
by
Koot33
[
Today
at 04:18:08 am]
LazPaint (alpha-blending,...
by
lainz
[
Today
at 02:21:33 am]
Is there a way to combine...
by
Leledumbo
[
Today
at 02:17:02 am]
threading question
by
anonymousstranger
[
Today
at 02:15:37 am]
Problem with POST
by
Leledumbo
[
Today
at 01:56:16 am]
FileExists() behaviour ch...
by
lucamar
[
Today
at 01:23:18 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Need help with external process (Read 296 times)
nikel
Full Member
Posts: 123
Need help with external process
«
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?
«
Last Edit: October 29, 2020, 11:08:43 am by nikel
»
Logged
marcov
Global Moderator
Hero Member
Posts: 9023
FPC developer.
Re: Need help with external process
«
Reply #1 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
Logged
nikel
Full Member
Posts: 123
Re: Need help with external process
«
Reply #2 on:
October 29, 2020, 04:59:49 pm »
Thanks for the reply.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
Need help with external process
TinyPortal
© 2005-2018