Interacting with Users
Let’s try a script with a few more features, again using Notepad enter the following text, and save it as "script2.vbs":
Dim strName 'Define the variable
strName = InputBox("Enter your name:") 'Get the users name
WScript.echo "Hello " & strName 'Show the user the name entered
When you run this script, the first thing you will see is an input box requesting your name (this is generated with the InputBox() function), enter your name and click OK.

The next screen will show you the name entered on the first screen using the WScript.Echo method.

To see how this script works let’s go through it line-by-line; on the first line we define the variable "strName", a variable is used to store information, in this case a persons name. On the second line we used to InputBox() function to request the user for some information, we then take the response and place it in the "strName" variable. On the final line, we display the information back to the user, for this we used the WScript.Echo method that prints the supplied text on the users screen.


















