-3

Hi I want to write some scripts to do some automatons, the choices are I can either use Windows BAT or Python/Perl, which one is better? for simplicity reasons.

For example, I want to execute the following command at a fixed interval to disable/enable the WLAN interface card:

 netsh interface set interface name="Wi-Fi 2" admin=disabled
 netsh interface set interface name="Wi-Fi 2" admin=enable
4
  • Can you provide some more details?
    – tacaswell
    Jan 1, 2013 at 5:43
  • If time is of essence, you should hire a development firm already versed in windows automation. You can have a solution in hours instead of weeks. Jan 1, 2013 at 6:37
  • 3
    When faced with exactly this problem, rather than learn how to program or hire someone who already knew, I just drove to the nearest union-unfriendly country and hired some 12-year-old kids to flick a switch back and forth at a fixed interval. They're much easier to debug than programs, or programmers, and it meant I was able to blissfully avoid learning anything about that language Python/Perl. However, training bats to do it does sound kind of cool.
    – abarnert
    Jan 1, 2013 at 7:12
  • 1
    Put the comands in a batch file, then use the at command to schedule them
    – ikegami
    Jan 1, 2013 at 19:27

1 Answer 1

3

If this is the only automation script you're ever going to be writing, don't take the time to learn either one. Get someone else to do it. You could probably get a high school student to do something this simple for the cost of whatever video game is on top of his Steam wish list.

On the other hand, if you're going to be doing this kind of thing repeatedly, you definitely want to learn at least one scripting language to at least the novice level. Eventually, you're probably going to want to know at least one from each set of Python, Perl, or Ruby; DOS batch, bash (under MinGW or cygwin), or PowerShell; and some .NET scripting language.

But SO is not the place to ask which one to learn first, or even which one is appropriate for this particular task.

3
  • 5
    I'm not sure which I dislike the most about all this. The "get someone else to do it for you answer", the child-labor story, or the fact that the OP accepts this. :)
    – selbie
    Jan 1, 2013 at 7:44
  • 1
    @selbie: I suppose the problem here is that you need to hire someone with a sense of humor to read things for you, so you won't take everything so seriously. I can recommend some sweatshops in Guatemala or Malaysia where the child workers love to laugh.
    – abarnert
    Jan 1, 2013 at 8:03
  • 1
    Hence the :) emoticon at the end of my comment. That means I'm laughing as I type it. ;)
    – selbie
    Jan 1, 2013 at 12:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.