[Lazarus] Launching External Tool Cmd.exe in Windows

shoKwave shokwave at gmx.net
Thu Sep 22 10:38:12 CEST 2016


Hi,

I simply tried putting a TProcess and a TButton on a form and used 
following code

procedure TForm1.Button1Click(Sender: TObject);
begin
   Process1.ApplicationName:='c:\windows\system32\cmd.exe';
   Process1.Execute;
end;

Works for me on a Win10 32bit machine with FPC 3.0.0 and Lazarus 1.6.

Ingo

Am 22.09.2016 um 08:14 schrieb Lars:
> Hi, Lazarus has the nice feature of being able to launch an external tool.
>
> I'm trying to launch a console app...
>
> So I put C:\Windows\System32\cmd.exe in the program file name for the
> external tool. This does nothing and gives no error message. Also add the
> parameter /k and it still does nothing.
>
> Any idea how to get lazarus to launch a simple cmd.exe instance as an
> external tool? Should this be filed as a bug if it doesn't work?
>
> Other things I will try... COMSPEC... but still cmd.exe should work, no?
>
>



More information about the Lazarus mailing list