Sign in with
Sign up | Sign in
Your question

Command prompot problem solution

Last response: in Windows XP
Share
July 15, 2010 7:41:53 AM

command prompot open but less tnan 5 seconds its automaticlly close,please help me .
July 15, 2010 8:20:51 AM

mdnajmulhuq said:
command prompot open but less tnan 5 seconds its automaticlly close,please help me .


Copy & Paste this in Notepad:


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\Command]

@="Command &Prompt"

[HKEY_CLASSES_ROOT\Directory\shell\Command\command]

@="cmd.exe \\\"%1\\\""


Save as:

File Name: Command Prompt.reg
Save as type: All Files

Click save

Go find this thing now that it is saved. When you find it, double-click it.
When a box shows up asking if you want this merged into the System registry, click yes.
Now at any folder you can right-click and the context menu will have "Command Prompt" as a option.
When this command prompt is launched, it will have it's path already set to where you launched it from.
See if invoking the command prompt this way makes it stay. If it stays something is watching your keystrokes and killing it after 5 seconds. Do virus scan.

m
0
l
July 15, 2010 1:47:48 PM

mdnajmulhuq said:
command prompot open but less tnan 5 seconds its automaticlly close,please help me .


How are you starting it? Is it with a program or a batch file? Or by actually running the cmd.exe?

Many command line programs/scripts will run, then close when they are complete or if there is an error.

If you are running a program (say runme.bat or runme.cmd) and you want the output to stick around, first open a regular command promt using cmd.exe, and then execute the program from that window. It will write any output/errors to the window and will not shut down automatically.
m
0
l
!