How to save a SysUtils.ExecuteProcess command result to string? lazarus / 61-Beginners ---------------------------------------------------------------------- jim3223 · 2020-02-17 22:45 Im using Windows 10 and ran this command.. SysUtils.ExecuteProcess('c:\windows\system32\cmd.exe', '/cdir', []); It gives the result of the shell command 'dir' How can i save the results of this command to a string? Please help. ---------------------------------------------------------------------- winni · 2020-02-17 22:48 Hi! At this page: https://wiki.freepascal.org/Executing_External_Programs there is a description of TProcess and an example how you can read the output of external programms. Winni ---------------------------------------------------------------------- marcov · 2020-02-18 08:32 Use Runcommand, which is a wrapper for TProcess styled like ExecuteProcess. See url above. I recommend against rolling your own TProcess code unless you know extremely well what you are doing. Many homegrown wrappers are buggy.