WinBatch Versus WSH
Question:
I want to sell my new boss on buying the new version of WB.
Do you have a white paper outlining the differences/advantages to using WB over Windows Scripting Host? I can
think of a few points already where WB is superior: option to compile, development speed, IDE, learning curve,
simpler syntax, resources for beginners, etc.
However, how do the two scripting languages stack up programmatically? Is there anything that WB
can do (or can do much more simply) than WSH?
Answer:
I shall assume for the moment that when you say "Windows Script Host" that you mean WSH running VBSCript,
its native scripting language, and that you are aware that you can plug other scripting languages into it.
Though I am sure there are others, I can think of quite a few advantages offered by WinBatch over VBScript.
- WinBatch generally runs circles around VBScript, which is, in my experience, dreadfully slow by comparison at just about any task.
- WinBatch has hundreds of native functions, including a very rich set of UI functions that let you easily prompt for file and directory names and other input, including through very slick dialog boxes. In contrast, VBScript has very primitive user interface capabilities and no support for dialog boxes without calling into the Win32 API.
- VBScript has the FileSystemObject for processing files, which is limited to text files, has no file locking facilities, and is cumbersome to use. WB has FileRead and FileWrite for text and BinaryRead and BinaryWrite for binary data, which the FSO can't handle at all.
- So far as I know, VBScript has nothing equivalent to DLLCall, which gives you easy access to just about any DLL that follows the STDCALL calling convention, which opens up most of the Win32 API.
- Registry operations are a snap with the native Reg* functions. Such operations are much more cumbersome in VBScript.
- Freely available extender libraries such as Postie, the ADSI extender, and the Win32 networking extenders give you clean, straightforward access to Active Directory, the security features of NTFS and the Windows Registry, and the ability to send email notifications directly through any ESMTP gateway. WinBatch Extender libraries integrate tightly with the WinBatch Studio IDE.
- WinBatch Studio is a much more complete and robust IDE than the Windows Script Editor, which is really little more than a crude, stripped down version of the VBA debugger.
Now you should have a good start.
Article ID: W16509
File Created: 2005:02:18:12:21:06
Last Updated: 2005:02:18:12:21:06