X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Georg Newsgroups: comp.os.msdos.djgpp Subject: Re: System() Date: Mon, 28 May 2012 13:39:19 -0700 (PDT) Organization: http://groups.google.com Lines: 35 Message-ID: References: <92c86f75-e970-4998-94c6-56d6fbf885fe AT e15g2000vba DOT googlegroups DOT com> <1c38ca22-52f5-470e-813f-1af6ed5f21d4 AT m16g2000yqc DOT googlegroups DOT com> <9e4eebca-6004-4c60-990a-a02d0c251ec7 AT h19g2000yqj DOT googlegroups DOT com> <4facb41e AT news DOT x-privat DOT org> <4fb5d194 AT news DOT x-privat DOT org> NNTP-Posting-Host: 46.78.35.225 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1338237559 30628 127.0.0.1 (28 May 2012 20:39:19 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Mon, 28 May 2012 20:39:19 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: ec4g2000vbb.googlegroups.com; posting-host=46.78.35.225; posting-account=v5xbdQoAAAAOGc9Ccc-kLZyobvPlN3Qr User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4,gzip(gfe) Bytes: 2645 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q4SKj3tZ012024 Reply-To: djgpp AT delorie DOT com On May 18, 6:35 am, Jason Hood wrote: > On 11/05/2012 22:07, Georg wrote: > > > Thank you Jason! I assume I could also write the line to execute into > > an environment variable [setenv("doit", "notepad", 1);] and call that > > No, that won't work, as the environment is local to the process - once > your manager exits, the variable is lost.  Your manager has to write > the actual batch file.  Let's say your manager is called "manager.exe", > you start it with "go.bat" and the program to run is "run.bat". > > go.bat: > @echo off > ::start the file manager > manager > :loop > ::if the manager didn't create a file, it exited > if not exist run.bat goto eof > call run.bat > del run.bat > ::run the manager again, but let it know it's returning from a program > manager -restart > goto loop > :eof > > run.bat: > ::whatever program was selected by the manager > @notepad > ::one problem with this technique is having to take care of arguments > ::in particular, you have to double up percent signs > > -- > Jason. Thank you, Georg