[fpc-pascal] Run process and exit (win32)

Leonardo M. Ram´┐Ż martinrame at yahoo.com
Tue Oct 23 14:38:23 CEST 2007


> program ShellExec; {$mode objfpc}{$H+}
> 
> uses
>   pwumain, windows;
> 
> begin
>   WebWriteln(' Hello! ');
>   ShellExecute(0 , 'open', 'cmd /k c:\winnt\notepad.exe', nil, nil,
> SW_SHOWNORMAL) ;
> end.
> 
> Because cmd /k forks open a new separate cmd shell for you (not a child, AFAIK).
> But test it, and let me know.
> 

Thanks L, do you know if I ShellExecute can create a process without showing the command window?

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the fpc-pascal mailing list