views:

144

answers:

3

Hi. Is there some default Windows scripting language that comes pre-installed on XP and Vista (Similar to how OS X comes with Python and/or Linux comes with Perl)?

I am aware of Batch scripting but I am hoping for something a little more robust. Thanks

note - I am on a Linux box so if you guys could give your 2 cents on the Windows scripting languages, it would be appreciated, thanks.

part deux - even though ebgreen hates me i accepted his answer because he gave me his 2 cents.

+6  A: 

Windows XP and Vista have VBScript and jscript engines installed by default. Windows 7 will also have Powershell installed.

As for my 2 cents, VBScript and jscript are both very mature technologies that have plenty of resources available. Neither of them give you a console if you are looking for that.

Powershell is newer and much much more powerful. It also has the advantage of having a console as well.

EBGreen
If having a console is a big thing, you can quite easily build one in either VBScript or JScript using stdin and stdout-streams that are available through the WScript object in combination with eval in JScript and Execute/ExecuteGlobal in VBScript.
svinto
That is true, but I don't know why you would want to. It seems to me that installing powershell (or even cygwin with bash) would be easier than writing your own console.
EBGreen
My only gripe about the PowerShell console is that it *still* doesn't let you easily resize it above a fixed width.
Harper Shelby
Really? Mine is 140 columns wide right now. How big are you trying to make it?
EBGreen
Harper, PowerShell v1 is hosted in the VERY old Windows Console Subsystem, and that means you can't resize, or Ctrl-C to copy, etc. In PowerShell v2 there is a new GUI for PowerShell that is a modern peice of UI.
Jay Bazuzi
I just changed the size of a V1 console window in about 15 seconds. Still not sure exactly what the issue is.
EBGreen
+4  A: 

Windows Scripting Host, invoked through Cscript.exe supports VBScript and JScript. Windows PowerShell is another scripting tool, but it's a separate download.

Harper Shelby
See http://en.wikipedia.org/wiki/Windows_Script_Host for more info on windows script host
Binary Worrier
Just for completeness, the WSH can be invoked via WScript.exe as well. As a matter of fact that is the default.
EBGreen
+3  A: 

XP and Vista come out of the box with VBScript and JScript support. There's a primer available at: http://msdn.microsoft.com/en-us/library/hbxc2t98.aspx. Vista can optionally have installed PowerShell which will also ship by default with Windows 7. A powershell primer can be found at: http://technet.microsoft.com/en-us/library/cc196356.aspx

Wolfwyrd