Tech Support > Computers & Technology > Command Prompt
Command Prompt
Posted by Rosco on November 28th, 2005


Is there a way to keep the command prompt open after running a batch
file in XP Home. Basically I have a few batch programs that I would
like to give me a listing of various programs and ask me to enter the
number corresponding to the program I want it to run. Currently I can
get it to display the list but as soon as it does the command window
closes out so basically I have to run a batch program that just runs
cmd.exe to get the window to stayopen then then i have to remember what
number corresponds to what program.

Posted by Trax on November 28th, 2005


Rosco <rosco111DELETE@charterCAPS.net> wrote:

|>Is there a way to keep the command prompt open after running a batch
|>file in XP Home. Basically I have a few batch programs that I would
|>like to give me a listing of various programs and ask me to enter the
|>number corresponding to the program I want it to run. Currently I can
|>get it to display the list but as soon as it does the command window
|>closes out so basically I have to run a batch program that just runs
|>cmd.exe to get the window to stayopen then then i have to remember what
|>number corresponds to what program.

CMD /K <arguments> will keep the window open after being run.

Try CMD /? next time for other options.

--
Take a game break...
http://games.briankass.com/

Posted by Rosco on November 28th, 2005


Trax cried out

How would I integrade that into a batch file though. something like:

echo off
cls
echo Please select the program you wish to start?
echo.
echo.
echo 1. Program 1 Name
echo.
echo 2. Program 2 Name
echo.
echo 3. Program 3 Name

and so on. I have the corresponding batchfiles name 1, 2, 3, 4, and
such. Basically its VNC connections, I need to batch file to open a
specific connection to a specific computer not just the main viewer
prompt.

Posted by PC on November 28th, 2005


"Rosco" <rosco111DELETE@charterCAPS.net> wrote in message
news:Xns971BD32C0CCDFrosco111NOCAPScharte@69.28.18 6.121...


Rosco

http://http-server.carleton.ca/~dmcfet/menu.html
http://www.cs.ntu.edu.au/homepages/b...scription.html
http://www.cknow.com/tutorcom/batch05_examples.htm
http://www.allenware.com/icsw/icswidx.htm
http://www.computerhope.com/batch.htm

Paul.



Posted by Rosco on November 28th, 2005


PC cried out

Thanks Paul, I'll check that out

Posted by Trax on November 28th, 2005


Rosco <rosco111DELETE@charterCAPS.net> wrote:

|>Trax cried out
|>
|>> Rosco <rosco111DELETE@charterCAPS.net> wrote:
|>>
|>>|>Is there a way to keep the command prompt open after running a
|>>|>batch file in XP Home. Basically I have a few batch programs that
|>>|>I would like to give me a listing of various programs and ask me
|>>|>to enter the number corresponding to the program I want it to
|>>|>run. Currently I can get it to display the list but as soon as it
|>>|>does the command window closes out so basically I have to run a
|>>|>batch program that just runs cmd.exe to get the window to
|>>|>stayopen then then i have to remember what number corresponds to
|>>|>what program.
|>>
|>> CMD /K <arguments> will keep the window open after being run.
|>>
|>> Try CMD /? next time for other options.
|>>

|>How would I integrade that into a batch file though. something like:
|>
|>echo off
|>cls
|>echo Please select the program you wish to start?
|>echo.
|>echo.
|>echo 1. Program 1 Name
|>echo.
|>echo 2. Program 2 Name
|>echo.
|>echo 3. Program 3 Name
|>
|>and so on. I have the corresponding batchfiles name 1, 2, 3, 4, and
|>such. Basically its VNC connections, I need to batch file to open a
|>specific connection to a specific computer not just the main viewer
|>prompt.

Not sure what your trying, but have you tried the CALL command to run
a subroutine?

Or my favorite to send commands is PowerPro
http://powerpro.webeddie.com/

--
Take a game break...
http://games.briankass.com/

Posted by Rosco on November 28th, 2005


Trax cried out

Ok, let me try to explain it a lil better, it might take some space
but here goes.

Main Program: Connections.bat
Location: C:\RealVNC Connections\

echo off
cls
echo Welcome to the connection manager!
echo This program will allow you to connect to the computers on your
local network as if you were sitting at that computer.
echo.
echo Please select the corresponding connection.
echo.
echo.
echo 1. Dell
echo.
echo 2. Server
echo.
echo 3. HP
echo.
echo 4. Gateway
echo.
echo 5. Laptop
echo.
echo.
echo.
echo Please make your selection (1 - 5)



Secondary Program: 1.bat
Location: C:\RealVNC Connectons\

c:\Realvnc connections\dell.vnc
exit

Secondary Program: 2.bat
Location: C:\RealVNC connections\

c:\realvnc connections\server.vnc


etc....
right now all i can get is the main program to appear then it closes
back out before allowing input. the only way I can get this to work
is for the shortcut to point to a batch file whos only line is
"cmd.exe" and is located in c:\realvnc connections. basically it
brings up the generic command promt and I enter 1-5 to select the
proper connection. This does work but I would like to install this
same program on the other computers throughtout the house and the
other uses need the ablility to connect to other computers sometimes
but are not nearly as compouter savy.

Posted by Trax on November 28th, 2005


Rosco <rosco111DELETE@charterCAPS.net> wrote:

|>right now all i can get is the main program to appear then it closes
|>back out before allowing input. the only way I can get this to work
|>is for the shortcut to point to a batch file whos only line is
|>"cmd.exe" and is located in c:\realvnc connections. basically it

So it works for you.

|>brings up the generic command promt and I enter 1-5 to select the
|>proper connection. This does work but I would like to install this
|>same program on the other computers throughtout the house and the
|>other uses need the ablility to connect to other computers sometimes
|>but are not nearly as compouter savy.

Have you look'd into an installer?
http://www.thefreecountry.com/programming/setup.shtml

--
Take a game break...
http://games.briankass.com/


Similar Posts