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
i need to know
Batch file
yes you can have a batch file run and open cmd
.bat file
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
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
thous in need of help let me know and ill do my best to advise you Remember i am not fault for damge you cause this is for learning Purposes only!!! visit http://nongkrong.team-forum.net/
-
- Posts: 147
- Joined: Tue Jul 03, 2007 2:00 am
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
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
....
nice way of putting but both ways work just fine
thous in need of help let me know and ill do my best to advise you Remember i am not fault for damge you cause this is for learning Purposes only!!! visit http://nongkrong.team-forum.net/