Windows Scripting Host is not my friend right now.
See, I thought it would be an interesting experiment to see if I could perform some basic system administration tasks in JavaScript. If it sounds a little dodgy, I'm here to tell you you're right, but maybe not for the reasons you'd expect. See, Windows Scripting Host (
wscript.exe) allows you to execute JavaScript functions from the OS and console, just like real executables. Since a lot of the files I've got sitting around are in some dialect of XML or other, I figured, well, between the
Microsoft.XMLHTTP object and the
Scripting.FileSystemObject ActiveX objects, I'll be unstoppable !
Well, not quite. At best, WSH is as powerful as the typical American grasp of Spanish -- just good enough to get you into trouble, but not nearly good enough to get you out. To its credit, it worked as advertised. I was able to instantiate and use ActiveX objects with the greatest of ease. But I couldn't do the simplest things:
Scripting.FileSystemObject is good if you want to create, open, or delete files, but useless if you want to append to one. If you want to shell DOS commands, give up right now and go back to yer slackware. And may the gods pity you if you deal in binary files.
Nevertheless, it's a good thing to keep in mind, especially if you're good with JavaScript and don't have a lot of real OOP experience.
Current Mood:
frustrated