Page 1 of 1

i need to know

Posted: Thu Jul 19, 2007 4:10 pm
by boza08
i just wanna know, can we open command prompt using batch file? i mean create one batch file to run cmd? another question is, is there another way to run command prompt without using start button?
i a newbie, tq

Batch file

Posted: Thu Jul 19, 2007 6:01 pm
by Kilo
yes you can have a batch file run and open cmd

re;

Posted: Fri Jul 20, 2007 2:52 pm
by boza08
can you teach me how to create it one details?.plez..

.bat file

Posted: Fri Jul 20, 2007 7:03 pm
by Kilo
when creating a .bat file you will use notepad
open notpad
this is were you will add the location of the file you will wat to run.

in your case you want cmd.exe to run

so in notepad type

C:\WINDOWS\system32\cmd.exe

now when you save it make sure you know the location but at the same time make sure you save it as a .bat file not a .txt

run the .bat and it should pop up the cmd
your done

Posted: Sun Jul 22, 2007 3:13 am
by athlete501
that or instead of running the file. you could have this command instead.

cmd /k

this just makes it so you dont have to open command prompt twice (once when running the batch and once again after the batch is done to load cmd.exe). its just a memory savor kinda.

so what does it mean? well cmd is a command that is just universal to add tags to certain things. when you dont use it, the batch will terminate after the job is done. cmd /k makes it so it doesnt terminate. (k being the constant variable/tag) the opposite is cmd /c (c for close) and will make it terminate after that COMMAND is done. any stuff written in a .bat after that command will not be executed. so ya. there you go

....

Posted: Mon Jul 23, 2007 4:04 pm
by Kilo
nice way of putting but both ways work just fine