Right hand doesn't know . . .
It struck me this morning as I was gluing Outlook's COM object to PHP code to send an internal email how 2 camps in the scripting end of things (PHP,ASP,WSH, etc.) seem to be completely ignorant (whether intentionally or not) of what the other camp is doing. The folks in the Microsoft camp are busy using VBScript and .NET with WMI, WSH, etc. but are completely unaware that things like easy CD burning, etc. are easily done with open source tools that have been ported (like cdrtools from Cygwin) to Windows. However, the other side (using PHP, Python, Perl, etc. to script Linux machines) is just as ignorant of what's going on on the Microsoft side of things. If I see one more Linux scripting advocate bemoan the lack of cron only to find out they've never even used "AT" or the Windows Scheduler service, I think I'll smack someone.
Personally, I think that a mix between the open source/Linux stuff and the Windows capabilities and addons makes for some seriously powerful tools with which to build quick solutions to problems.
For me, the blend of Javascript or PHP for the UNIX style coding and network/database communication and access to the Windows hooks is a very usable blend. I get to keep the C-style syntax that fits in with the way I think and work and still get to use all of the stuff that's written for VBScript. Once you've ported 5-6 VBScripts to either PHP or Javascript, it's a pretty transparent process really. The biggest thing to watch out for is where VBScript is passing what looks like a variable or constant that you don't see defined anywhere in the sample. This usually means that it's actually some integer that's defined in a "Constants" table somewhere. You can usually get the right number to pass in instead by looking for the constants for that object. Make sure you use the instantiation name for the COM object in Google and you'll usually find it pretty quickly.
