VTool (VTOOL.EXE) is a program code component according to the Component Object Model standard (COM), sometimes referred to as "ActiveX". More specifically, VTool is a COM server, which is a runtime module that can provide objects and related functionality to another COM-supporting application (client).
VTool was developed primarily for use with Windows Script Host and Visual Basic Script (WSH/VBS). The reason is simply that this scripting environment is versatile, powerful and available on all Windows systems. Furthermore extensibility is constituted by COM modules.
Scripts often use COM modules, such as the FileSystemObject (scrrun.dll) or the shell component (shell32.dll), which make additional functions available to the script. The script (or generally the COM client) uses these components by creating an instance of one of the objects (classes) defined there:
Set obj = CreateObject("Scripting.FileSystemObject") Set obj = obj.CreateTextFile("test.txt", True) obj.Close
In the same way, the objects of VTool can be used, e.g.:
Set obj = CreateObject("VTool.Window") obj.Create "Textinfo window" obj.WriteLine "sample text" obj.Remove
To make this so easy, VTool —like all COM servers— must be registered once during installation (see below).
VTool wasn't originally intended as a general toolbox or library. Many objects and functions just resulted from practical needs. For instance, once I wanted to read a registry value (it was probably about the standard browser) which proved to be dependent on the Windows version. As a result, version information is now available as an object. In this way, the module has slightly grown over time.
One main thing is to have some elements for user interaction, which otherwise would not be available in a script. For instance:
Set obj = CreateObject("VTool.DriveList") drv = obj.Selection("e:", "Drive Selection")
WSH/VBS unfortunately also lacks the ability to call Windows API functions. (But have a look here.) Therefore, some object methods of VTool provide such calls, for example to support the processing of INI files:
Set obj = CreateObject("VTool.Profile") obj.File = "test.ini" var = obj.GetValue("Area51", "Roswell")
to obtain certain system data:
Set obj = CreateObject("VTool.System") MsgBox obj.VolumeGetGUID("C:\"), , "GUID for drive C:"
or, as mentioned, to identify the Windows version:
Set obj = CreateObject("VTool.OsVersion") var = "Windows version: " & obj.Major & "." & obj.Minor & "." & obj.Build WScript.Echo var
The following table lists all objects of the current version of VTool in alphabetical order.
|Aux||several auxiliary functions|
|BinFile||binary read/write access to files|
|CheckList||pick list (multiple selections with checkboxes)|
|Clipboard||text interchange with the system Clipboard|
|DateTime||a few functions regarding the system time|
|DriveList||pick list with available drives|
|DTPick||a dialog for date or time selection|
|EventLog||recording event information|
|File||some file functions|
|FileSelection||dialog window for file selection|
|List||pick list (single or multiple selection)|
|Me||some VTool data|
|MessageBox||Windows message dialog|
|Noise||sound generation and playback|
|OsVersion||Windows version data|
|Profile||read/write INI files|
|ProgressWindow||window with a progress bar control|
|Registry||search for registry items|
|System||access to some system information|
|TaskDialog||Windows task dialog|
|Window, Window2||windows for continuous text output|
The selection lists are displayed in modal dialog windows. The windows provided by ProgressWindow, Window, and Window2 are modeless and can serve to show information during longer processes.
The help file VTOOL.CHM contains detailed descriptions.
The objects of VTool are uncomplicated and designed for easy use. Their application follows the usual pattern:
' object is created Set obj = CreateObject("VTool.Noise") ' object (obj) is used obj.PlayFile "tada.wav" ' object is released (deleted) Set obj = Nothing
Of course, some parts are more sophisticated and will require a good knowledge of technical essentials and the operating system.
VTool is provided as freeware and "as is" without any warranty or liability. Of course, suggestions for improvements are welcome.
Please note that any usage of VTool and the supplied samples is at your own risk!
The file vtool.zip contains VTOOL.EXE along with description (VTOOL.CHM and its German version VTOOL_DE.CHM).
Version status: 2.6.0, Jan./Feb. 2019.
For installation it suffices to extract this content to a folder of your choice. As a COM module VTool has to be registered once, which generally requires administration rights. The recommended procedure is to open a console window ("Command Prompt") as Administrator, switch to the chosen folder, and then enter the instruction
To update an earlier version it is recommended to deregister that version before. The procedure is analogous to the registration, except that the instruction is
Afterwards, the VTool files can be deleted or simply overwritten by the new files. Then the current version has to be registered.
Please also give attention to the program documentation.
The file samples.zip contains a few scripts (VBS) regarding the utilization of certain Windows version data, the application of the Shell's folder selection dialog, and the setting of file times.
VTool requires the VB6 runtime files which are normally included with Windows (but are also available as download).