🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #14996

Re: system CDM

#14996
From: Bob Gonder
Date: Fri, 25 Jul 2003 19:30
14 lines
1477 bytes
Stephane Baillargeon wrote:

>How can I execute multiple commands in one and only one cmd window without
>using a batch file. Is it possible?

I would think adding one line would help:

>example:
	AttachConsole();
>system ( "dir" );
>system ( "pause" );

If that doesn't work, then instead of system(), you could get the
COMSPEC environment variable and use it in spawnl() with P_WAIT.
Technical Details
Message-ID: <6l03ivo563re3i2asljnr0urd3mmd74601@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!pln-w!extra.newsguy.com!lotsanews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f216b4f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,aec67fd76b7834fc
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-25 12:40:41 PST
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: system CDM
Date: Fri, 25 Jul 2003 12:30:55 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <6l03ivo563re3i2asljnr0urd3mmd74601@4ax.com>
References: <3f216b4f$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.31.165.207
X-Trace: newsgroups.borland.com 1059161453 67.31.165.207 (25 Jul 2003 12:30:53 -0700)
Lines: 17
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!pln-w!extra.newsguy.com!lotsanews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail