Console program starts and closes MS-DOS window immediately

B

Boris

I have a menu item in the Windows XP start menu which starts a console
program. The console program requires however to specify various options.
When I click on the menu item without specifying options the MS-DOS window
opens, the console program starts, prints some explanations, ends and the
MS-DOS window gets closed - not very helpful.

Is there a setting somewhere where I can specify that the MS-DOS window
remains open so I can use the MS-DOS command line and start the console
program with some options? I don't mind if the console program starts and
prints out some explanations as long as afterwards the MS-DOS window is not
closed automatically.

Thanks in advance,
Boris
 
G

GreenieLeBrun

Boris said:
I have a menu item in the Windows XP start menu which starts a console
program. The console program requires however to specify various options.
When I click on the menu item without specifying options the MS-DOS window
opens, the console program starts, prints some explanations, ends and the
MS-DOS window gets closed - not very helpful.

Is there a setting somewhere where I can specify that the MS-DOS window
remains open so I can use the MS-DOS command line and start the console
program with some options? I don't mind if the console program starts and
prints out some explanations as long as afterwards the MS-DOS window is not
closed automatically.

Thanks in advance,
Boris

Write a .bat file containing the name of the program, the various
switches/options and on the next line the command PAUSE, this should
leave the command prompt window open untill you press a key.

Example :-

c:\stuff\console.exe /? /e /Z /p
pause
 
B

Boris

GreenieLeBrun said:
[...]
Write a .bat file containing the name of the program, the various
switches/options and on the next line the command PAUSE, this should
leave the command prompt window open untill you press a key.

Example :-

c:\stuff\console.exe /? /e /Z /p
pause

The options change - I must be able to specify them flexibly. What I like to
see is Windows opening the command prompt window, running the console
program and then waiting for further commands in the command prompt window.
If there was a setting somewhere to tell the console program not to close
the MS-DOS window after finishing that would be nice. But is there something
like this or do I have to write a batch file?

Boris
 
G

GreenieLeBrun

Boris said:
GreenieLeBrun said:
[...]
Write a .bat file containing the name of the program, the various
switches/options and on the next line the command PAUSE, this should
leave the command prompt window open untill you press a key.

Example :-

c:\stuff\console.exe /? /e /Z /p
pause

The options change - I must be able to specify them flexibly. What I like to
see is Windows opening the command prompt window, running the console
program and then waiting for further commands in the command prompt window.
If there was a setting somewhere to tell the console program not to close
the MS-DOS window after finishing that would be nice. But is there something
like this or do I have to write a batch file?

Boris

Try :-

cmd /K program name
 
G

Glen

Instead of opening it from a shortcut, do start | run | cmd.This will open
the command window and allow you tp type in any commands you want and the
window will stay open.

--
Please repost if you find the fault

Glen P
~~~~~~~~~~~~~~~~~~~~~
Boris said:
GreenieLeBrun said:
[...]
Write a .bat file containing the name of the program, the various
switches/options and on the next line the command PAUSE, this should
leave the command prompt window open untill you press a key.

Example :-

c:\stuff\console.exe /? /e /Z /p
pause

The options change - I must be able to specify them flexibly. What I like
to see is Windows opening the command prompt window, running the console
program and then waiting for further commands in the command prompt
window. If there was a setting somewhere to tell the console program not
to close the MS-DOS window after finishing that would be nice. But is
there something like this or do I have to write a batch file?

Boris
 
B

Boris

GreenieLeBrun said:
[...]
The options change - I must be able to specify them flexibly. What I
like to see is Windows opening the command prompt window, running
the console program and then waiting for further commands in the
command prompt window. If there was a setting somewhere to tell the
console program not to close the MS-DOS window after finishing that
would be nice. But is there something like this or do I have to
write a batch file?

Boris

Try :-

cmd /K program name

It works when I enter it in the command prompt window. However a menu item
in the Windows XP start menu which links to "cmd /K program.exe" only opens
a new command prompt window without running the program.

Boris
 
B

Boris

Glen said:
Instead of opening it from a shortcut, do start | run | cmd.This
will open the command window and allow you tp type in any commands
you want and the window will stay open.

I'm looking for an easier way as the console program will be shipped with a
setup file. It should be visible for customers in the Windows XP start menu.
They should simply click on the menu item, the command prompt window should
open, the program should be started (so they can see options they can use)
and the command prompt window should stay open. I wonder now if I have to
ship a batch file with the setup file or if I can do without (the less files
to support the better).

Boris
 

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

Top