Michael Van Canneyt wrote 16 lines
On Wed, 15 May 2013, Marcos Douglas wrote:
> Hi,
>
> I want to execute a batch file on Windows (FPC 2.6.2 and Laz trunk)
> using TProcess class.
> It ONLY works if I use the [poWaitOnExit] and DO NOT USE [poNoConsole]
> options.
>
> I do not want to see the console so, I need to use [poNoConsole]
> option. Is this a bug?
As far as I know, batch files need CMD and that needs a console ?
I saw then:
http://www.freepascal.org/docs-html/fcl/process/tprocess.options.html
poNoConsole = Do not allow access to the console window for the process (Win32 only)
So the "correct" is do not use poNoConsole!
I saw after:
http://www.freepascal.org/docs-html/fcl/process/tprocess.showwindow.html
TProcess.ShowWindow = Determines how the process main window is shown (Windows only)
I do not understood why the interface of TProcess have a property that only works on Windows... but works.
Thank you anyway.
Marcos Douglas