Results 1 to 5 of 5

Thread: NTVDM Dos EXE

  1. #1
    deadlyBuzz is offline Member
    Join Date
    Feb 2012
    Posts
    15
    Rep Power
    0

    Default NTVDM Dos EXE

    Hi Folks
    I'm having trouble with NTVDM or CMD.EXE.
    I have have to use an old DOS based program here at work.
    This program contains a series of smaller executables that can be run inpedependenty.
    These executables are traditionally run from the command line in the form

    C\:>DC <program name>

    where "<program name>" is the "project" you wish to process.

    The DC program then runs and pops up a dos menu of options and asks to select an option to execute on the file.

    I can run this program from the command line perfectly using either the command "C:\DC.EXE <Program Name>" in which only the NTVDM.EXE process executes but the DC program executes and displays correctly.

    If I type into the command line "cmd.exe /c c:\dc.exe <program name>", both the NTVDM.EXE and CMD.EXE processes run and the program displayes correctly.

    However when I attempt to call either of the above commands from the Runtime.exec() or process builder programs, Both CMD.EXE and NTVDM.EXE processes run but don't display the Menus or return the stream (input or error) to my program. This causes the program to hang at process.waitFor() untill I Kill the NTVDM.EXE process in Task manager.

    If I could display the program output for a user to select the menu I would be fine, I would preferrably like to automatically select option "3" by sending a "3" to the program on display of the Menu.

    I've read and attempted to implement the different code samples from "http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=1",
    "http://www.rgagnon.com/javadetails/java-0014.html" and "http://mindprod.com" but am getting the same issues every time. I'm handling the input streams etc but cannot seem to get a response.

    Anyone got any ideas how to implement this?
    Alan

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: NTVDM Dos EXE

    I've read and attempted to implement the different code samples from "http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=1",
    There are three more pages linked from there. Did you go through all of them and implement all the recommendations?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    deadlyBuzz is offline Member
    Join Date
    Feb 2012
    Posts
    15
    Rep Power
    0

    Default Re: NTVDM Dos EXE

    Quote Originally Posted by DarrylBurke View Post
    There are three more pages linked from there. Did you go through all of them and implement all the recommendations?

    db
    Yup. ALL of them, 4 pages worth. Although not the ones using commands as this is not a command but a genuine application.
    The programs work for opening notepad.exe and work for executing the "DIR" command but my DC program just Hangs!

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: NTVDM Dos EXE

    Does that program write to StdOut or does it open its own console? I ask because this isn't very clear to me:
    If I type into the command line "cmd.exe /c c:\dc.exe <program name>", both the NTVDM.EXE and CMD.EXE processes run and the program displayes correctly.
    Not sure what you mean there by 'both' the processes. Two console windows?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    deadlyBuzz is offline Member
    Join Date
    Feb 2012
    Posts
    15
    Rep Power
    0

    Default Re: NTVDM Dos EXE

    Quote Originally Posted by DarrylBurke View Post
    Does that program write to StdOut or does it open its own console? I ask because this isn't very clear to me:Not sure what you mean there by 'both' the processes. Two console windows?

    db
    I'm unsure if it writes its own StdOut. Only one console screen opens but there are 2 individual processess running in task manager. One called "NTVDM.EXE" and oner called "CMD.EXE" (With the exception of the situation where I call the command "C:\DC.EXE <Program Name>" from the run menu.

    DC.EXE This is an OLD third party Dos program that I don't have source code for.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •