VTOOL.EXE: description


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)

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"

To make this so easy, VTool —like all COM servers— must be registered once during installation (see below).

The current version of VTool is 1.4, which presents a variety of improvements and extensions compared to the previous version 1.3.2.


VTool wasn't really intended as a general toolbox or library, the objects and functions mostly 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.

The main thing is still 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("d:", "Drive Selection")
Abb. Dialogfenster (Laufwerksauswahl)

WSH/VBS unfortunately also lacks the ability to call Windows API functions. 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.

Object Functionality
CheckList pick list (multiple selections with checkboxes)
Clipboard text interchange with the system Clipboard
DriveList pick list with available drives
EventLog recording event information
List pick list (single or multiple selection)
Me some VTool data
Noise sound generation and playback
OsVersion Windows version data
Profile read/write INI files
System access to some system information
Window, Window2 windows for continuous text output

The selection lists are displayed in modal dialog windows. The windows provided by Window(2) are modeless and can serve to show text 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, all applied data must have appropriate values and be of corresponding types. Take into account that variables of some clients like VBScript are typeless, whereas VTool's object properties and method parameters represent particular data types. However, possible incompatibilities can be avoided by explicit conversions.

License, Notes

VTool is provided as freeware and "as is" without any warranty or liability. Of course, suggestions for improvements are welcome.

Download, Installation

The file contains VTOOL.EXE along with description (VTOOL.CHM).
Version status: 1.4.0, May 2017.

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

vtool.exe /regserver

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

vtool.exe /unregserver

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.

VTool requires the VB6 runtime files which are normally included with Windows (but also available as download).

ERCC (  2013 - 2017   © Erhard Riedel Computer Consulting (ERCC)

link to info overview