VBScript began as part of the Microsoft Windows Script Technologies, launched in 1996. This technology (which also included JScript) was initially targeted at web developers. During a period of just over two years, VBScript advanced from version 1.0 to 2.0, and over that time it gained support from Windows system administrators seeking an automation tool more powerful than the batch language first developed in the early 1980s.[4]

On March 6, 1988, Alan Cooper showed Bill Gates his shell prototype that allowed widgets to be added dynamically. On March 20, 1991, Microsoft adopted “Quick Basic”. This allowed users to create Windows apps quickly and easily with a GUI. Finally, on August 1, 1996,Internet Explorer was made with features that included VBScript

VBScript (Visual Basic Scripting Edition) is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. It is designed as a “lightweight” language with a fast interpreter for use in a wide variety of Microsoft environments. VBScript uses the Component Object Model to access elements of the environment within which it is running; for example, the FileSystemObject (FSO) is used to create, read, update and delete files.

VBScript has been installed by default in every desktop release of Microsoft Windows since Windows 98;[1] in Windows Server since Windows NT 4.0 Option Pack;[2] and optionally with Windows CE (depending on the device it is installed on).

A VBScript script must be executed within a host environment, of which there are several provided with Microsoft Windows, including: Windows Script Host (WSH), Internet Explorer (IE), and Internet Information Services (IIS).[3]Additionally, the VBScript hosting environment is embeddable in other programs, through technologies such as the Microsoft Script Control (msscript.ocx).

VBScript is the default language for Active Server Pages. It can be used in Windows scripting and client-side web page scripting. It resembles VB in syntax, but is a separate language—executed by vbscript.dll instead of the VB runtime. ASP and VBScript should not be confused with ASP.NET, which uses the .NET Framework for compiled web pages.


Working with VBScript accessing COM Component


Recently I had to debug an .asp file using <%@ Language=VBScript %>

The issue is that it mentions Set p = Server.CreateObject(“a.b”),

Now what is a.b here ? and where is it present ? in the VD there is only this one asp file

server.createobject in vbscript


Turns out that a.b is a COM component that is being used here.

Next I want to find out the Registration Entries for this component from the Windows Registry : https://www.simple-talk.com/dotnet/visual-studio/build-and-deploy-a-.net-com-assembly/

Late Binding with a VBScript Client

Late-binding is so called because you don’t know if the methods exist until run-time. Late binding is based on the standard COM IDispatch interface, which has methods that return information about the methods and properties on an interface so that they can be discovered at run time. As an analogy, it’s somewhat the equivalent of using .NET reflection to find the structure and methods of .NET classes.

This is the VBScript:

dim obj,amsg
set obj = CreateObject (“CallPDW.Class1”)
amsg = obj.GetMyString
msgbox amsg

Just to state the obvious, there’s no checking that any of the methods such as GetMyString actually exist with that parameter structure when you write that script. This is discovered when you run the script using the IDispatchinterface on the object.

COM REGISTRATION: http://www.ewall.org/tech/msi/com-registration

Calling COM Components from ASP Pages: http://msdn.microsoft.com/en-us/library/ms524620(v=vs.90).aspx