Okara Cantt - Pakistan's Biggest IT Education Forum
Welcome To OkaraCantt - Pakistan's Biggest IT Education Forum. We Hope You Enjoy Your Visit.

You're Currently Viewing Our Forum As A Guest. This Means You Are Limited To Certain Areas Of The Board And There Are Some Features You Can't Use. If You Join Our Community, You'll Be Able To Access Member-Only Sections, And Use Many Member-Only Features Such As Customizing Your Profile, Sending Personal Messages, And Voting In Polls. Registration Is Simple, Fast, And Completely Free.

HomeCalendarFAQSearchRegisterLog in

Share | 

 [TUT] How To Run ANY CMD Command With Batch Files (Simple)

Go down 

Join date : 2011-04-16
Posts : 75
Points : 8919
Reputation : 5010
Gender : Male
Browser :

PostSubject: [TUT] How To Run ANY CMD Command With Batch Files (Simple)   Sat Nov 19, 2011 2:38 am

how to run any command with a batch file.

1. Right click and create a text document.
2. In the text document type the following:
@echo off
cmd.exe /k [command]
3. Save the file as test.bat
4. Run the batch script.
5. Your command you put into the command field should now run!

Example Script:

@echo off
cmd.exe /k ipconfig

Some Notes:

1. As said before, this may not work with you, however, it should.
2. You MUST put /k before the command you wish to use.
3. Some commands are probably blocked by default by your administrator. An example of a blocked command may be the "net user" command. If you can use all commands successfuly, good for you.
4. This does not completely remove the block on command prompt. It simply allows you to run the command you put after "/k". So, when you want to change commands, you have to change the batch file.
5. Obviously, do not put the []'s when typing your batch script.
6. Please press that shiny thanks button if this helped you.
Back to top Go down
[TUT] How To Run ANY CMD Command With Batch Files (Simple)
Back to top 
Page 1 of 1
 Similar topics
» Selenium server command options while starting server.
» unknown command "if"?!
» Command for mouse over in webdriver
» com.thoughtworks.selenium.SeleniumException: ERROR: Command execution failure.
» Test javascript Calendar

Permissions in this forum:You cannot reply to topics in this forum
Okara Cantt - Pakistan's Biggest IT Education Forum  :: Hacks, Exploits, and Various Discussions :: Hacking Tutorials-
Jump to:  

Chat Room OKaraCantt.CoM

Free forum | © phpBB | Free forum support | Contact | Report an abuse | Forumotion.com