Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

How do I automate command line?


  • Please log in to reply
1 reply to this topic

#1 bigalexe

bigalexe

  • Members
  • 170 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Michigan, USA
  • Local time:09:55 PM

Posted 21 November 2011 - 05:41 PM

Ok so how do I write a program or script to automate command line functions. Example being I want a shortcut to open the command line and run "ipconfig /all"

Yeah it's stupid simple but eventually I'd like to expand this to automate further functions.

Knowledge... C++.
AMD Phenom II X6 2.8ghz
8GB DDR3 RAM
XFX ATI Radeon HD6850 1 GB DDR5, 26" Widescreen HDMI
500GB + 80GB HDD
Windows 7 Pro, Mozilla Firefox, AutoCAD 2011, Solidworks 2009
1/19/2012

BC AdBot (Login to Remove)

 


#2 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,257 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:07:55 PM

Posted 21 November 2011 - 05:50 PM

Every command parser on every OS allows for some level of scripting. On Windows you can use a batch file, on Linux, Mac OS X, BSD, and others you can use a Bash script file. In both cases the files are basically lists of commands to carry out as if you were typing them one-at-a-time into the command line.

Edited by Andrew, 21 November 2011 - 05:50 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users