C++ App to Run in DOS and Launch Another App

C++ App to Run in DOS and Launch Another App

Post by tempnod » Wed, 22 Oct 2008 01:58:00


I have a problem that I can't seem to solve:

I need to write a C++ app that will run off of a floppy.
Basically, I will boot into DOS (from a floppy), and run my
executable
from the floppy. The executable will crunch some data and then
launch
another application.


How can I launch the other application?


I've tried system(), but it needs a specific path, which isn't viable
in DOS mode. The two apps will be in the same directory, so
basically
this is the process:


CrunchData();
LaunchApp();


How could I launch the other app? I don't think ShellExecute() or the
Process class will work since this will be running in DOS, but I may
be wrong.



Thanks so much.
 
 
 

C++ App to Run in DOS and Launch Another App

Post by Victor Baz » Wed, 22 Oct 2008 02:34:27


You're asking something specific to your platform, not to the language.
Please consider asking in the newsgroup that deals with your OS.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask

 
 
 

C++ App to Run in DOS and Launch Another App

Post by tempnod » Wed, 22 Oct 2008 03:06:01


Well, actually, the question is specific to both the platform and the
language. This board has more members than does the DOS board, so I
figured I would get more responses and quicker feedback.

Since my question IS focused on C++, it does belong here; and anal
replies like yours are vain, elitist, and unnecessary. If you don't
want to help me, then don't. I asked for some help nicely, and you
proceeded to flex your internet forum muscle by redirecting me when my
question was quite relevant.


If anyone else can help me, I would really appreciate it.


Thanks
 
 
 

C++ App to Run in DOS and Launch Another App

Post by Ian Collin » Wed, 22 Oct 2008 03:43:08


OK, what is your C++ language question?

--
Ian Collins
 
 
 

C++ App to Run in DOS and Launch Another App

Post by tempnod » Wed, 22 Oct 2008 03:59:04


how can i launch another executable without using system() or the
Process class? It needs to work in DOS.
 
 
 

C++ App to Run in DOS and Launch Another App

Post by Ian Collin » Wed, 22 Oct 2008 04:08:23

[context?]



That's a DOS question, not a C++ language one.

The C++ answer would be to use system(). The standard language doesn't
provide any other means of launching an executable.

--
Ian Collins
 
 
 

C++ App to Run in DOS and Launch Another App

Post by RXJpayBXaW » Wed, 22 Oct 2008 05:24:22


To clarify a bit why this is not a C++ question it should be mentioned
that system() invokes platform-dependent behaviour, so questions about
how to use system() should be directed to a group discussing the platform.

--
Erik Wikstrm
 
 
 

C++ App to Run in DOS and Launch Another App

Post by AnonMail20 » Thu, 23 Oct 2008 04:47:06


Just use a .bat file to run your apps. This way, you can set up the
PATH variable *before* you launch your first app. But if you use a
..bat file, you can just launch your first app, and then depending on
it's return code, launch your second app and there will be no need
for the first app to launch the second app (or any need to set the
path). .bat files are the lowest common denominator "shell" for
windows/DOS apps.

HTH