Re:Setting property (close on exit) in a DOS WINDOWS - from DELPHI
In article <3465F67B.B11D8...@cpunet.com.br>, "Fabricio J. L. Lima"
<e...@cpunet.com.br> writes
Quote
> How could i set the property "CLOSE ON EXIT" in a DOS WINDOW like a:
>ARJ.EXE when executed from EXECUTEFILE (Filename,...).
>=================================-------------------------------------------
Hmmm.. usually running a DOS program from Windows will automatically
cause it to close when finished, but a quick and dirty solution would be
to create a batch file that runs yuor DOS program - this would be easy
and would work with all versions of Windows. fx;
const
BatFilename = 'arj.bat';
var
BatFile : TextFile;
begin
AssignFile(BatFile, BatFilename);
ReWrite(BatFile);
Write(BatFile, 'c:\utils\arj.exe');
Write(BatFile, '@exit'); {check this !!}
CloseFile(BatFile);
WinExec(PChar(BatFilename), SW_SHOWNORMAL); {cast is D2/D3 only}
end;
--
Jeremy Collins