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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tempnode@gmail.com

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

    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.
  • Victor Bazarov

    #2
    Re: C++ App to Run in DOS and Launch Another App

    tempnode@gmail. com wrote:
    [..]
    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.

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

    Comment

    • Ian Collins

      #3
      Re: C++ App to Run in DOS and Launch Another App

      tempnode@gmail. com wrote:
      On Oct 20, 1:34 pm, Victor Bazarov <v.Abaza...@com Acast.netwrote:
      >tempn...@gmail .com wrote:
      >>[..]
      >>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?

      --
      Ian Collins

      Comment

      • tempnode@gmail.com

        #4
        Re: C++ App to Run in DOS and Launch Another App


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

        Comment

        • Ian Collins

          #5
          Re: C++ App to Run in DOS and Launch Another App

          [context?]

          tempnode@gmail. com wrote:
          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.

          --
          Ian Collins

          Comment

          • =?UTF-8?B?RXJpayBXaWtzdHLDtm0=?=

            #6
            Re: C++ App to Run in DOS and Launch Another App

            On 2008-10-20 21:08, Ian Collins wrote:
            [context?]
            >
            tempnode@gmail. com wrote:
            >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.

            --
            Erik Wikström

            Comment

            • AnonMail2005@gmail.com

              #7
              Re: C++ App to Run in DOS and Launch Another App

              On Oct 20, 12:58 pm, tempn...@gmail. com wrote:
              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

              Comment

              Working...