ms-dos

G

Guest

where can i set default options for cmd.exe ?
i want to be able to tell cmd.exe to stop after completion of a command.

for instance, when i Start>Run>"some console command">[Enter], i want that
the command prompt remains open after "some command" completes.

i don't want to use <cmd /k "some command"> every time i run a console
command.

i'm looking for a <set shell parameter=/k> or something like that, or a
registry value to set.

btw, i had the inspiration of placing a "cmd.exe /k" in
hklm/software/microsoft/command processor/autorun, and guess what
(obviously), it loops when i run cmd.exe. the interesting thing, which
surprised me, was that it doesn't loop when i run a console program (like
ping or dir), so the autorun reg_sz value isn't querried when starting a
usual console application.

SO, HOW CAN I TELL THE COMMAND INTERPRETER TO KEEP A CONSOLE PROGRAM'S
WINDOW OPEN AFTER COMPLETION ????
 
P

Pegasus \(MVP\)

Ardealul said:
where can i set default options for cmd.exe ?
i want to be able to tell cmd.exe to stop after completion of a command.

for instance, when i Start>Run>"some console command">[Enter], i want that
the command prompt remains open after "some command" completes.

i don't want to use <cmd /k "some command"> every time i run a console
command.

i'm looking for a <set shell parameter=/k> or something like that, or a
registry value to set.

btw, i had the inspiration of placing a "cmd.exe /k" in
hklm/software/microsoft/command processor/autorun, and guess what
(obviously), it loops when i run cmd.exe. the interesting thing, which
surprised me, was that it doesn't loop when i run a console program (like
ping or dir), so the autorun reg_sz value isn't querried when starting a
usual console application.

SO, HOW CAN I TELL THE COMMAND INTERPRETER TO KEEP A CONSOLE PROGRAM'S
WINDOW OPEN AFTER COMPLETION ????

Run your commands in a Command Prompt window rather than
in the Run box. By the way, your subject line is obviously out
of line. You're running Windows 2000 and not ms-dos. As you
write correctly, you're dealing with the Command Interpreter,
not with ms-dos.

Running commands from the Run box has several drawbacks:
- The process terminates on completion of the command (as you found out)
- You cannot execute internal commands such as cd, del, copy unless
you launch an extra command processor.
- You cannot concatenate commands.
- You cannot redirect the output from your commands

You have none of these drawbacks when running your
commands from the Command Prompt.
 
E

Enkidu

Ardealul said:
where can i set default options for cmd.exe ?
i want to be able to tell cmd.exe to stop after completion of a command.

for instance, when i Start>Run>"some console command">[Enter], i want that
the command prompt remains open after "some command" completes.

i don't want to use <cmd /k "some command"> every time i run a console
command.

i'm looking for a <set shell parameter=/k> or something like that, or a
registry value to set.

btw, i had the inspiration of placing a "cmd.exe /k" in
hklm/software/microsoft/command processor/autorun, and guess what
(obviously), it loops when i run cmd.exe. the interesting thing, which
surprised me, was that it doesn't loop when i run a console program (like
ping or dir), so the autorun reg_sz value isn't querried when starting a
usual console application.

SO, HOW CAN I TELL THE COMMAND INTERPRETER TO KEEP A CONSOLE PROGRAM'S
WINDOW OPEN AFTER COMPLETION ????

What Pegasus says. You could also put a shortcut to
"cmd.exe" on your desktop.

Cheers,

Cliff
 
G

Guest

thanks for your input, but i had already considered all of these
options/drawbacks/advantages. the question still remains open.

i am using a system (program) that does not allow me to enter cmd.exe first
and the command afterwards. i MUST enter the command and find a way to pause
it at the end. i am looking for something like |more to enter as a parameter
to the command. the problem with more is that it stops after the first page
only. if the output is less than 1 page it just exits.
 
D

Daniel Hicks

for instance, when i Start>Run>"some console command">[Enter], i want that
the command prompt remains open after "some command" completes.
Why not just go Start > Programs > Accessories > Command Prompt?

Or, as suggested, a shortcut to cmd.exe on the desktop. Why execute
commands at Run ?
 

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