home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18289 < prev    next >
Encoding:
Internet Message Format  |  1992-12-13  |  1007 b 

  1. Path: sparky!uunet!utoday!jaflrn!jaf
  2. From: Jon Freivald <jaf@jaflrn.UUCP>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: How to run a program from another program using Turbo C??
  5. Message-ID: <yRkPVB4w164w@jaflrn.UUCP>
  6. Date: Sun, 13 Dec 92 01:48:45 EST
  7. References: <162.2B2709C4@business.fidonet.org>
  8. Organization: The Wizzard's Cave, East Meadow, NY
  9. Lines: 18
  10.  
  11. Mike.Tedder@f181.n363.z1.fidonet.org (Mike Tedder) writes:
  12.  
  13. >   printf("\nShelling to DOS...\n");
  14. >   spawnlp(P_WAIT,"COMMAND.COM",NULL);
  15.  
  16. Ah!  You are one of the many culprits -- I don't use, and don't like
  17. command.com!!!  Please do the following instead:
  18.  
  19.                 spawnlp(P_WAIT,getenv("COMSPEC"),NULL);
  20.  
  21. In this manner, I get my native (& much nicer) command interpreter!!!
  22.  
  23. Jon
  24.  
  25. =============================================================================
  26.            Jon Freivald ( jaflrn!jaf@uunet.UU.NET )
  27.      Nothing is impossible for the man who doesn't have to do it.
  28. =============================================================================
  29.