Command prompot problem solution



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.

 


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.