Board index » delphi » Setting property (close on exit) in a DOS WINDOWS - from DELPHI

Setting property (close on exit) in a DOS WINDOWS - from DELPHI

    How could i set the property "CLOSE ON EXIT" in a DOS WINDOW like a:

ARJ.EXE when executed from EXECUTEFILE (Filename,...).

Any Sugestions?

   ______     __,,__  _____
  / ____/___ _\_/   \/    /______________________________
 / ___/     /  /\        /    __/ /  / / /  / / .\  ==/ .\
/_____/  __/__/  >      <  __/___/__/___/_/__/___/___/___\
     /__/      /    /\   \
 - - --- ===  /____/  \___\  ===============-------------  - -
========================---------------------------------------------------

HPaGe - http://www.cpunet.com.br/usuarios/epix/
SEGA MASTERSYSTEM PAGE -
http://www.cpunet.com.br/usuarios/epix/master.htm
IRC - BRASIRC,BRASILNET,UNDERNET,EFFNET #games #emu #opgame #emuroms
#emunation
Nick: EpiXThunD - EpiX[HH] - EpiX-95 - EpiX
QUAKE - Zaz1;2,Mandic,Procergs(Viars1;2),Elogica,E-Net,Servnet -
EpiXThundeR[HH]
E-MAIL - e...@cpunet.com.br ; e...@wwdg.com ;
epixthun...@headhunters.com.br
ICQ NUMBER - 837138 - CALL ME!!! =)
=================================-------------------------------------------

 

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

Other Threads