VBScript is a scripting language developed by Microsoft on Visual Basic Language.
VBScript is a propriety client-side scripting language by Microsoft, supported by Internet Explorer
It is a lighter version of Visual Basic.
VBScript program needs to be hosted on any of these 3 environments:
- IIS (Internet Information Server) – Microsoft’s own web server software
- WSH (Windows Scripting Host) – The native hosting environment of the Windows OS
- IE (Internet Explorer) – The simplest hosting environment we can use to run VBScript
VB Script can only run on Windows machines and Internet Explorer browser.
The simplest tools that you can use to create and run VBScript are IE and any text editor.
Now we will move towards to the Process To run simple VBScript from Command Prompt (cmd).
Step 1 :
Create a new document file from notepad and add a simple message box VBScript to it.
Sample Message Box code :
x=msgbox("Your Text Here" ,0, "Your Title Here")
Step 2 :
Save the file with the ".vbs" extension.
Step 3 :
Open Command Prompt from start menu and call vbs file from command prompt using syntax as below.
Run file with the syntax :
cscript filenamewithpath.vbs
ex. here,
cscript C:\First.vbs
Its running Successfully now. :)
Here this video contains the method to run VBScript from Windowa 10 with simple script to display a message box using VBScript.
No comments:
Post a Comment