Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!hplabs!hpl-opus!hpspdra!sam From: sam@hpspdra.HP.COM (Sam Espartero) Newsgroups: comp.windows.ms Subject: Re: DOS batch files Message-ID: <14160003@hpspdra.HP.COM> Date: 17 Jun 90 03:04:46 GMT References: <2602@zipeecs.umich.edu> Organization: HP Stanford Park - Palo Alto, CA Lines: 25 # Is there a way to execute DOS batch files and then get a DOS prompt in #a Windows 3.0 window? If I set my PIF file to execute a batch file, when #the batch file is done, my windows closes or becomes inactive (depending #on how I set it). What I want it to do is to execute a batch file and then #give me the DOS prompt. Thanks. Try adding %COMSPEC% at the end of your batch file. Or just COMMAND.COM /E:XXX at the end. You can also get fancy and have the batch file act on a parameter. Like below, ..... at end of batch file, add the following ..... if %1 "==" goto end if %1==$ %COMSPEC% :end If you just type THATFILE at the DOS prompt, no shell will be executed. In Windows 3.0, put a $ in optional parameters. Your batch file executes and you get a DOS prompt, entering EXIT closes the window. ---------- - Sam (standard disclaimer applies) Espartero - Hewlett-Packard, Stanford Park Division 1501 Page Mill Road, Bldg. 5U Palo Alto, CA. 94304 (415)-857-5913, sam@hpspd.spd.hp.com