What tools and languages are available for windows shell scripting?

后端 未结 12 1135
孤独总比滥情好
孤独总比滥情好 2021-01-21 01:28

I want to know what are the options to do some scripting jobs in windows platform. I need functionality like file manipulations, registry editing etc. Can files be edited using

相关标签:
12条回答
  • 2021-01-21 01:55

    Scripting is a blast.

    Personally I like to write some evil little batch files. You can find a command line program to do just about anything. I prefer Batch files mostly because they are portable from one machine to another with at most a zip with a few unix tools (SSED, GREP, GAWK). there is a commandline REG.Exe that can even do Registry changes and reads. You can parse output from commands with a "FOR /f" loop.

    PowerShell does have more... err.. Power (2nd post I wrote that in, but I can't help it.)

    If you want to look at windows automation check out AutoHotKey.

    What are you trying to automate? That may help us narrow down what would be helpfull.

    • Josh

    EDIT: for the record I typed that at the same time as @jameso If someone at work hadn't asked me a question, I may have posted before him. I did get a bit of a shiver at the similarity of the post though....

    0 讨论(0)
  • 2021-01-21 01:56

    Batch files are the most portable, but doing complicated things can get hard (very hard).

    Powershell is incredibly - um - powerful, but the installed domain at the moment is only slightly more than those people who like using powershell and servers they administer. If you control the machines you're scripting on and can mandate that powershell is installed, powershell is the way to go. Otherwise, batch files are the best way.

    Powershell lets you do anything which can be done, but some things will be harder than others :)

    (Seriously, if you want to control a windows GUI app from a script, you're going to have a lot of pain unless the app supports scripting itself, or you want to start posting messages to dialog controls and screen scraping the dialog to check for success.)

    0 讨论(0)
  • 2021-01-21 01:57

    How about installing a windows version of Python, Perl or your favorite language? These should offer all the functionality you need.

    0 讨论(0)
  • 2021-01-21 01:58

    I think Windows PowerShell from Microsoft is the current favourite for this sort of thing.

    0 讨论(0)
  • 2021-01-21 02:00

    CScript ? I remember seeing something like that.

    0 讨论(0)
  • 2021-01-21 02:02

    Yesterday I could have repaired this for you ;)

    What all are the tools/languages for windows shell scripting?

    Would read better as

    What tools and languages are available for windows shell scripting?

    0 讨论(0)
提交回复
热议问题