Results 1 to 5 of 5
Thread: NTVDM Dos EXE
- 04-05-2012, 01:20 PM #1
Member
- Join Date
- Feb 2012
- Posts
- 15
- Rep Power
- 0
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
- 04-05-2012, 02:26 PM #2
Re: NTVDM Dos EXE
There are three more pages linked from there. Did you go through all of them and implement all the recommendations?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",
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 04-05-2012, 03:34 PM #3
Member
- Join Date
- Feb 2012
- Posts
- 15
- Rep Power
- 0
- 04-05-2012, 05:10 PM #4
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:
Not sure what you mean there by 'both' the processes. Two console windows?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.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 04-06-2012, 11:46 AM #5
Member
- Join Date
- Feb 2012
- Posts
- 15
- Rep Power
- 0
Re: NTVDM Dos EXE
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.


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks