Speaking of ghetto languages, when exactly is the Windows Script Host going to be updated with a modern language-- like, say, .NET? I want my WSH.NET!
I still use WSH to write quick and dirty command line utilities that don't justify a full blown .NET console executable. Like UNIX shell scripts, there's a lot of power there for relatively little effort. And I don't have to fire up the VS.NET 2003 IDE to do it, either. Unfortunately, VBScript-- the shared script language of classic ASP and the Windows Scripting Host-- is rapidly being left behind in an increasingly .NET-centric world. The worst thing is, it's just similar enough to fool you into trying some VB.NET syntax, even though you know better.
It seems like a relatively simple exercise to build WSH.NET, and in fact, several third parties offer stopgaps that deliver script-alike execution of .NET code in plaintext files:
However, this isn't the same as a Microsoft blessing. These little tools are all incompatible with each other, require an explicit installation step, and have quirks of their own. I have no idea why Microsoft hasn't stepped up to the plate with a proper WSH.NET implementation. I did find this cryptic post dated late 2001 by Andrew Clinick of Microsoft:
WSH 5.x will remain with us for a long time to come (not least because it's built into the operating system) We are working on plans for WSH.NET but don't have concrete info we can share at present.To answer the question a bit more does .NET make WSH obsolete? No. It would be great to use VB .NET and JScript .NET in WSH and that's something we're working on but in the mean time having to compile exe's etc is more difficult than just writing a script and running it. We're working on making that much simpler in WSH.NET
Whatever those "plans" were, 3 years later, we're still waiting.
Posted by Jeff Atwood View blog reactions
« Stuck in a VB.NET Ghetto Managed HTML rendering »
I've never used WSH but it seems to me that MSH (Microsoft Command Shell, codenamed Monad) will do a good job when it's finished:
http://www.osnews.com/story.php?news_id=7419
I have tried out an early preview and it looks very promising.
markus on October 15, 2004 08:00 AMMarkus beat me to it. Monad is basically going to replace the command shell and any scripting host type thing more than likely.
I mean it can pass .NET objects instead of text. Conforming that to become a "host" requires 0 work I would think unless MS "makes it so".
Jeremy Brayton on October 15, 2004 03:31 PMHmm, I didn't realize MSH/Monad was so ambitious. So you can just type in .NET keywords at the commandline, such as..
C:\>Console.WriteLine("Hello World!")
.. yes?
Jeff Atwood on October 15, 2004 06:57 PMSome monad stuff here:
http://pensieve.thinkingms.com/CommentView,guid,8bafabcf-5ca4-41b7-a1a0-94a876a16e34.aspx
Not quite Console.WriteLine("Hello World!"), but it's hard to say. Does anyone have samples of .NET code running on the MSH shell?
Jeff Atwood on October 27, 2004 02:07 AM| Content (c) 2008 Jeff Atwood. Logo image used with permission of the author. (c) 1993 Steven C. McConnell. All Rights Reserved. |