Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   ejecutar un .bat Como? (https://www.clubdelphi.com/foros/showthread.php?t=5735)

pruz 02-12-2003 17:51:05

ejecutar un .bat Como?
 
hola amigos,

no se como utilizar el shellexecute u otra instruccion para ejecutar un programa .bat, trate de usar el mencioando y no encuentra la funcion, trabajo con delphi 6

Saludos,
Pruz

Nadie 02-12-2003 18:09:08

Código:

(...)
uses shellapi;
(...)
begin
 shellexecute(handle,nil,'notepad.exe',nil,nil,sw_shownormal);
end;
(...)


pruz 02-12-2003 18:22:07

Gracias Nadie por responder,

pero me aparece error

var
xx : string;
begin

xx := rutaflex + 'cuentas.bat';
Shellexecute(handle,nil, xx ,nil,nil,sw_shownormal);


end;

[Error] UDetCosto.pas(120): Incompatible types: 'String' and 'PChar'

que hacer
Gracias

__cadetill 02-12-2003 19:00:23

Cita:

pruz comentó:
var
xx : string;
begin

xx := rutaflex + 'cuentas.bat';
Shellexecute(handle,nil, PChar(xx) ,nil,nil,sw_shownormal);


end;

pruz 02-12-2003 19:23:45

gracias, entendido,


La franja horaria es GMT +2. Ahora son las 06:35:42.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi