🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #7804

Help - DOS commands from program...

#7804
From: Jeff Meyers
Date: Tue, 26 Jan 1993 23:13
25 lines
1554 bytes
I have written a simple installation program in Turbo Pascal and am having
trouble executing DOS commands from within this program.

If the user types "a:install" everything works fine.  But, if they log to
the floppy first, then run install ( A:\>install <cr> ) things choke.

Specifically, the destination directory is not created and so the files
are all copied into a file in the root directory.  I use the Turbo Pascal
command exec() to call the following command:

    \command.com /C md C:\DEST

I also had trouble logging drives and changing directories under program
control, but got around that by haveing the install program create the
appropriate batch file, then executing it...

Question: am I missing something? Why don't the DOS commands work the
same as at the command line??


-- 
============================================================================
| Jeff Meyers      |  jmeyers@ecst.csuchico.edu      | 39x43'N  121x48'W   |
| Chico, Ca 95926  |  KD6DIS@KE6LW.#NOCAL.CA.USA.NA  | Grid: CN80-CM99 ??  |
============================================================================
Technical Details
Message-ID: <1k4gi7INNou2@charnel.ecst.csuchico.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!bogus.sura.net!howland.reston.ans.net!spool.mu.edu!olivea!charnel!jmeyers

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!bogus.sura.net!howland.reston.ans.net!spool.mu.edu!olivea!charnel!jmeyers
From: jmeyers@ecst.csuchico.edu (Jeff Meyers)
Newsgroups: comp.os.msdos.programmer
Subject: Help - DOS commands from program...
Message-ID: <1k4gi7INNou2@charnel.ecst.csuchico.edu>
Date: 26 Jan 93 23:13:11 GMT
Organization: California State University, Chico
Lines: 25
NNTP-Posting-Host: psycho.ecst.csuchico.edu