Scripting language for Windows?

Possible duplicates:
The best "official" scripting language for Windows programmers
Universal Scripting Language for Windows
What tools and languages โ€‹โ€‹are available for Windows shell scripts?

I work on Windows and often find code for script code that manages files or basic string manipulations. I am currently doing this using PHP, but having a LAMP stack for this seems redundant. I tried things like autoHotkey, but the syntax and functionality are terrifying.

So, I'm looking for scripts with: a) syntax syntax b) many and many built-in libraries, functions, etc. c) minimum setting. Preferably, I would like to code and run a script from my application launcher, Executor

+6
windows scripting
source share
8 answers

Windows PowerShell โ„ข is a task-based command-line shell and scripting language specifically designed for system administration. Windows PowerShell โ„ข, based on the .NET Framework, helps IT professionals and power users manage and automate administration of the Windows operating system and applications running on Windows.

The Microsoft Windows Script host (originally called the Windows Scripting Host, but renamed for the second release) is an automation technology for Microsoft Windows operating systems that provides scripting capabilities comparable to batch files, but with a wide range of supported functions.

+14
source share

Mafutrct provided a very good answer; If you run Windows scripts, you should definitely start with PowerShell. Built-in commands, PowerShell extensions, and the ability to use the .NET runtime ensure that all your scripting requirements are met. I want only the best scripting language in PowerShell. If it was Javascript: (.

I want to point out that WSH remains a viable windowing scripting environment. The reasons why I continue to use it are as follows:

  • Functional and prototypical javascript makes it easy to write complex scripts
  • Drop in WMI, and almost all window-related windows can be done very easily. This is very useful for network and system administration tasks.
  • WSH scripts can be run with equal convenience both in the window and in the console (i.e. by calling wscript and cscript)
  • Writing a script is as simple as opening a notepad by typing a script, saving it as a js file (or .vbs, .wsh) and double-clicking the saved file
  • Although it no longer remains strictly a script, a .js file can be executed for the CLR using the .NETs Javascript compiler: jsc.exe. Like PowerShell, this provides access to the entire .NET platform.

Some of the scripts I wrote over the past few weeks were as follows:

  • Pulling data from an MS SQL server, creating an Excel sheet and transferring data to it and sending it to the client
  • Formatting, parsing, and filtering thousands of lines of VOIP logs and vector scripts
  • Using Ajax to retrieve data from a remote server, call a web service and transfer data to it
  • I pretend to be my employees when they use my laptop, remotely โ€œtalkingโ€ to them through the speakers using a script using the Microsoft Speech API. Here is a sample code:

    var sapi = new ActiveXObject("SAPI.SpVoice"); sapi.speak("hello world"); 
+6
source share

I am a fan of Python .

+2
source share

You can use PHP without a full LAMP stack. Of course, you do not want "L" if you are running Windows!

I would go with Strawberry Perl myself. Although it does not have a huge number of built-in libraries, it does have CPAN .

+1
source share

If (a) you have experience in the LAMP world, and (b) you mostly need file and string manipulations, I recommend Lua and Lua File System . This is the polar opposite of the design space:

  • Aggressively cross-platform. Lua itself (but not LFS) applies to handheld computers, Palm Pilots, etc.

  • Very simple, clean design. Incredibly high power to weight ratio.

Lua will be fine if the problems you solve are not Windows dependent and if there is a chance that you will want to use similar solutions on other platforms.

Lua is also extremely easy to learn (nothing terrifies), compiles with any C compiler, supports an excellent book and has a universal Windows implementation.

+1
source share

Perl, either a "real" win32 port (ActiveState or Strawberry Perl), or a variant of Cygwin.

0
source share

Rebol is good. The executable file is several hundred KB, does not require installation and can work with a graphical interface, as well as with a console file. It can access files, URLs, execute programs, you name them. The syntax is really minimal; Rebol has some of the best oneliners .. :)

0
source share

Give Python . Its cross-platform has a clear syntax, easy to install, many modules with batteries (if there is no Pypi repository, the equivalent for Perl CPAN).

0
source share

All Articles