Boards.ie uses cookies. By continuing to browse this site you are agreeing to our use of cookies. Click here to find out more x
Post Reply  
 
Thread Tools Search this Thread
25-04-2005, 20:02   #1
wolfman
Banned
 
wolfman's Avatar
 
Join Date: Apr 2002
Location: Location Location
Posts: 2,543
Send a message via ICQ to wolfman
Stop command prompt window from closing

How can I stop the command prompt window from closing when i run an exe file?

Ihave a file and when i run it, the command prompt window opens and waits for me to verify... yes OR no

Once I type in yes, the program runs but the window shuts
I need the window to remain open to read details from it

If I do it using start-->all programs-->accessories-->command prompt and change into the folder/directory where the exe file is stored and run it then, it will work ok, but surely there is a way that it can be run by double clicking the file itself without having to do this each time?
wolfman is offline  
Advertisement
25-04-2005, 20:36   #2
Fenster
Registered User
 
Fenster's Avatar
 
Join Date: Sep 2003
Posts: 4,550
Type echo on
Fenster is offline  
25-04-2005, 21:01   #3
wolfman
Banned
 
wolfman's Avatar
 
Join Date: Apr 2002
Location: Location Location
Posts: 2,543
Send a message via ICQ to wolfman
how do you mean?
i dont open the window to type it
i double click the exe file and it runs thru a few lines and then prompts for yes or no
wolfman is offline  
25-04-2005, 21:19   #4
Fenster
Registered User
 
Fenster's Avatar
 
Join Date: Sep 2003
Posts: 4,550
Enter the command "echo on" and then try to run the .exe
Fenster is offline  
25-04-2005, 22:04   #5
Krusty_Clown
Registered User
 
Krusty_Clown's Avatar
 
Join Date: Jan 2002
Location: Dublin, Ireland
Posts: 16,968
Send a message via AIM to Krusty_Clown
Probably the easiest thing to do is to create a batch file, like so:

cmd.exe /K [The path and name of your file]

So, for example, to launch calculator from the desktop in a command line window and have it persist, create a batch file like this:

mycalc.bat
cmd.exe /k c:\windows\system32\calc.exe


Alternatively, create (or edit) an icon for the application you wish to run, and change the target to: cmd.exe /k <path and name of the EXE you wish t have run in the window>
Krusty_Clown is offline  
Post Reply

Quick Reply
Message:
Remove Text Formatting
Bold
Italic
Underline

Insert Image
Wrap [QUOTE] tags around selected text
 
Decrease Size
Increase Size
Please sign up or log in to join the discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Share Tweet