disculpa no puedo editar el mensaje de arriva
agrege
Código:
QuotedStr(PChar(@ShortName))
y dice Incompatible types: 'String' and 'PAnsiChar'
tambien trate de colocar una condicion para ejecutar shortname si hay un espacio en la ruta pero no logro concretarla
puse
Código Delphi
[-]
begin
if edit1.text:=' ' then
GetShortPathName(PChar(opendialog1.FileName), @ShortName, Length(opendialog1.FileName));
if FileExists(Opendialog1.FileName) then
ShellExecute(Handle, 'open', 'arch.cmd', PChar(@ShortName), nil, SW_NORMAL)
else
ShowMessage('No se ha cargado Archivo');
end;
muchisimas gracias por la ayuda!!