Is VBScript or VBA Dead or Deprecated?
In future releases of Windows, VBScript will be available as a feature on demand before its removal from the operating system.
VBScript will be available as a feature on demand before being retired in future Windows releases. Initially, the VBScript feature on demand will be preinstalled to allow for uninterrupted use while you prepare for the retirement of VBScript.
Nonetheless VBScript is a very stable scripting language.
Is VBScript Still Relevant? Maybe, if you are a windows programmer, it is still worth learning VBScript and it is quick to learn! (It is old but that does not mean it is useless and should be abandoned completedly e.g. Pick the suitable tools)
Asking ChatGPT "Is VBScript Dead?" (15/October/2023):
No, VBScript is still alive and in use today. It is often used in web-based applications and is available on Windows computers as a scripting language.
Reference Post: SteemIt
Depending on the Host Environment, the VBScript can run in the following environments: Windows Scripting Host (WSH), Internet Information Server (IIS), .NET (Known as VB.NET), Microsoft Internet Explorer and Microsoft Office products (such as Excel).
VBScript, not to be confused with VB aka Visual Basic, is a scripting language. VBScript may seem outdated, and the support for VBScript is discontinued, but it is still being used in many places. Windows administrators may find it easier to learn/write than Powershell scripts.
VBScript is case insensitive so are other VB variants such as Visual Basic, VBA, ASP. The list of Reserved keywords in VBScript can be found HERE .
You can use this Online VBScript Obfuscator to protect your VBScript source code easily.
VBScript supports Object-Oriented programming. You can define classes and create their instances like this:
Class Boy
Private m_Name
Private Sub Class_Initialize
Name = ""
End Sub
Public Sub Set_Name(Name)
m_Name = Name
End Sub
Public Function Get_Name
Get_Name = m_Name
End Function
End Class
Set Jack = New Boy
Jack.Set_Name("Jack")
WScript.Echo Jack.Get_Name
Latest News of VBScript
- October 2023, Microsoft has annouced deprecation of VBScript in Future Releases of VBScript.
- August 2019, Microsoft disables VBScript in Internet Explore 11. That basically means the end of VBScript in the browser because of the dominant Javascript nowadays in the Browser. However, you can still enable VBScript (configurable via security zone or registry, or group policy) to run your legacy application written in VBScript in the browser.
-
Due to the cumulative updates in August 2019, the application written in Visual Basic 6, Visual Basic for Applications, or Visual Basic Scripting Edition may stop responding and throw error "Invalid Procedure Call Error"
VBScript in Windows Scripting Host (WSH)
On Windows Platforms, the Windows Scripting Host Environment is still the best place for VBScript, where VBScript is a handy, lightweight, powerful programming language/scripting language for daily administrative tasks.
VBScript with the CreateObject, is able to call unmanaged COM so that it is still a powerful tool (like a hammer) for many many tasks. It is still going to be shipped by the future OS in the forseeable future for many many years.
Perfect Couple: VBScript and COM
COM is an old Microsoft Technology. It has been invented since 1993. VBScript has been greatly enhanced by the capability to use COM. For example, the Microsoft Office and tons of other appliations are built on COM technology. You can create COM object easily and use the exported function APIs e.g.
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set ws = objExcel.Workbooks.Open("Some Excel File.xls")
COM is old technology not to be confused with VBScript. Could you see how easy to create/use the COM object in the above Excel example? The system administrators do not require IDEs or compile the source code. They just need to open notepad.exe (or other text editors), type in a few lines of VBScript, save it as *.vbs, and double click to run the VBScript under Windows Scripting Host environment. It works just like a charm!
Version
The VBScript version is 5.6 on Windows XP, 5.7 on Windows 7 and 5.8 (latest) on Windows 10. You can use the following VBScript code to show its version.MsgBox ScriptEngineMajorVersion & "." & ScriptEngineMinorVersion
Availability
VBScript is available on Every Windows Versions since Windows 98 (for Win 95, you need to install mannually Windows Scripting Host). This is great as it comes with the OS (you don't need to download and install the compiler or IDE). You can just open notepad, type in VBScript code, save it as *.vbs file extension. Double click the VBScript file and the VBScript code will be interpreted. For example, open a notepad and type the following, which will compute the sum from 1 to 100 using a single for loop.Dim S S = 0 For i = 1 to 100 S = S + i Next Msgbox "Sum from 1 to 100 = " & S
HTML Application
The HTA (HTML Application) is an easy way to write desktop/client software/application using HTML, where you can include VBScript or JScript. Bascially, most HTML files can be renamed as *.hta and you'll be able to launch them as a stand-alone desktop application using the Microsoft HTML Application Host.HTA Examples
VBScript Demos/Examples
- Which is Faster? VBScript or JScript on WSH – A Performance Comparison using Sieve of Eratosthenes
- List Items in the My Computer Folder using VBScript (WSH)
- ScriptUnit - VBScript/JScript Unit Tests Runner
- How to List Memory Devices in VBScript?
- Area of the Shadow? – The Monte Carlo Solution in VBScript
- VBScript Typewriter Machine
- How to Kill Multiple Processes (Tasks) by Name using VBScript?
- VBScript: How to Modify the Priority of a Running Process?
- and More...
Recommended VBScript Tools
- Script32 - VBScript to Binary Executables
- Vbsedit Toolkit Extends VBScript
- ScriptUnit – VBScript/JScript Unit Tests Runner
- Online VBScript Obfuscator
Other Posts of VBScript
VBScript Developer's Resources Download
- (8547 KB) advanced-vbs-ms.pdf : Advanced VBScript for Microsoft Windows Administrators
- (1395 KB) scrdoc56en.exe : documentation for Version 5.6 of VBScript, JScript, Windows Scripting Host
- (659 KB) scripten.exe : updates to Version 5.6 of the Microsoft scripting engine
- (820 KB) jscript.pdf : 430 page of Javascript section from script56.chm
- (659 KB) vbscript.pdf : 330 page of VBScript section from script56.chm
- (348 KB) script-runtime.pdf : 176 page of Script Runtime Objects from script56.chm
- (637 KB) windows-script-host.pdf : 340 page of Windows Script Host (WSH) from script56.chm
- (215 KB) windows-script-components.pdf : 100 page of Windows Scripting Components from script56.chm
- (1320 KB) script56.chm : a complete CHM help file contains the above documents
VBScript in Server Side as ASP
VBScript can be used in Server Side (IIS) scripting language e.g. most likely the scripting language used is VBScript in the URL that ends with *.asp. However, the websites that are developed using ASP (Active Server Page) are considered outdated and can generally be replaced by a much modern language or technology such as .NET, PHP or Java.VBScript as in VB.NET
VB.NET is a programming language targeted for Microsoft .NET platforms. However, VB.NET as limited by syntax, is not as powerful as C#. Therefore, unless you are a beginner, it is not recommended you choose VB as your .NET programming language because C# simply does a better job.VBA in Microsoft Office
The VBA stands for Visual Basic for Application, which is mainly used in Microsoft Office products. VBA can be quite powerful in creating customized formulas or Macros. For example,Dim Data(1 to 500) as String 'Copy all values in Data to worksheet range therange. Range("therange").Value = Application.WorksheetFunction.Transpose(Data)
Relevant VBA Posts
VBScript in Internet Explorer
In Microsoft IE Browsers, you can use VBScript (considering following example). However, you are NOT recommended to use VBScript for browser client scripting, since it is only supported in IE and the Javascript dominates all the browsers.<script language="VBScript"> Msgbox "Only in IE!" </script>
Contact Me
via Web Email.Donation helps
Donation helps the cost of the domain/server, and is very much appreciated.
Why Donate?
Check This page for a few reasons. :)Page Edited on Irregular Basis: 15/Oct/2023 11:21:42
View in AMP (Accelerated Mobile Pages) Version