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

T

tempnode

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.
 
T

tempnode

[..]
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.

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


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
 
I

Ian Collins

[..]
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.
You're asking something specific to your platform, not to the language.
Please consider asking in the newsgroup that deals with your OS.


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++,

OK, what is your C++ language question?
 
T

tempnode

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

Ian Collins

[context?]

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

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.
 
E

Erik Wikström

[context?]

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

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.


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.
 
A

AnonMail2005

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.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top