views:

373

answers:

3

Good morning,

I work in a small shop (only two of us) and we currently manage more .vbs scripts that we would like to (we would like to manage zero). One of the nice things about these scripts is that it's quick to make changes (as necessary) and go back to our day jobs.

That's all nice and good until we decide that the job needs to be changed substantially, and then a PITA to develop and debug, mostly because it feels like I'm shooting pool with a baseball bat.

Is there a more DotNet-y way to do Windows Scripting Host-like stuff that people have used and like? I'd prefer free/cheap tools, naturally.

Regards,

-Alan.

+3  A: 

PowerShell is the "next generation, .NET-based scripting platform" from Microsoft. I haven't looked at it in detail, but from what I've heard it's trying to combine the simplicity of Unix-style pipelines with the power of a rich object model.

Whether or not it fits in with exactly what you want to achieve is something I can't really say, of course - but it's certainly worth a look.

There are other .NET languages which are amenable to scripting - there are the dynamic languages such as IronRuby and IronPython, and also Boo (mostly static, but with duck-typing where you want it).

Jon Skeet
Thanks for the quick response. I'll invest some time into checking them out.
AlanR
I will second a hearty vote for the benefit of learninf PS.
EBGreen
A: 

Trying to get a fix on the future of VBScript is problematic. Microsoft have said that they're committed to keeping it going (second entry). However, whilst there is a JScript.NET there's no sign yet of a VBScript.NET.

There are various approaches to the issue apart from JScript.NET, for example DOTNET Scripting Host (DSH).

So VBScript seems to be more or less alive and well. A while back there was even a CodeProject article Scripting .NET applications with VBScript.

It's ultimately your choice; for me learning PowerShell is not high on my list of things to do, so I'll just plod on with VBScript as it stands and, as Fozzie Bear suggests, "hope that something better comes along."

boost
+1  A: 

I just stumbled upon http://www.csscript.net which let's you execute little c# scripts (no compiling). It's opensource to boot.

"CS-Script combines the power and richness of C# and FCL with the flexibility of a scripting system. CS-Script can be useful for system and network administrators, developers and testers. For any one who needs an automation for solving variety of programming tasks."

AgentThirteen
This looks very much like what I was hoping for. Going to try it out now. I'll accept the answer if it works at advertised :)
AlanR