Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!waikato.ac.nz!comp.vuw.ac.nz!cavebbs!youth!acolvin From: acolvin@youth.cavebbs.gen.nz (Aaron Colvin) Newsgroups: comp.lang.pascal Subject: Re: Redirecting Exec() output Message-ID: Date: 26 Apr 91 17:41:50 GMT References: <2435@pdxgate.UUCP> Organization: Home, Sweet Home! Lines: 43 mwizard@eecs.cs.pdx.edu (Craig Nelson) writes: > OK,OK,OK... I finally found something in TP 6.0 that I couldn't > figure out. Supposedly anything you execute from a DOS prompt should > execute the same from an Exec() call, so long as no direct video memory > calls are made... Well, I want to suppress output of a program that > does not use direct video memory, specificly, UNZIP.EXE . Now the weird > part. Typing: > > UNZIP FOO.ZIP c:\FOODIR > c:nul > > from the DOS prompt works like a champ. But if you use Exec() from the > DOS unit, and set the parameters like so: > > Exec('UNZIP.EXE','FOO.ZIP c:\FOODIR > c:nul'); > > and the output is no longer redirected to nul. It appears on the screen, > and I assure you it isn't a pretty site in the middle of a TVision program. Likewise, I have found the exact same prob when trying to redirect scan to a textfile, and the run a prog that ran through that text file and check for errors (it was automated in DESQview, and if a virus was found then it would beep furiously and shut down the system! and if not I wouldnt even no its running), but unfortunately I couldnt get it to go, and it wasnt necessary, as I had just downloaded the latest version of VShield v76c ... but as you say the redirection doesnt work at all and just goes straight to the screen, ignoring everything after the '>' .. I then tried a cheapo type answer, I made a batch file containing the following : scan c: > c:\system\scanchek.txt Again, worked fine from DOS, but from my program, instead of printing to the screen, and ignoring the redirection, it now locks up the whole flamin system! "Stupid thing" I said in disgust, and continued in finishing my other Hard Drive utility program, and the unit to go with it... So, I wouldnt mind figuring this out, even if it is just for knowledges sake, as I have no need for that program anymore...'vshield' does a fine job! :-) Cheers all.. -- acolvin@youth.cavebbs.gen.nz (Aaron Colvin) My Opinions, Are Just That, *My* Opinions...