strUserInput = GetUserInput( "Please enter your name:" ) WScript.Echo "Your name is: " & strUserInput Function GetUserInput( myPrompt ) ' This function uses Internet Explorer to ' create a dialog and prompt for user input. ' ' Version: 2.11 ' Last modified: 2013-11-07 ' ' Argument: [string] prompt text, e.g. "Please enter your name:" ' Returns: [string] the user input typed in the dialog screen ' ' Written by Rob van der Woude ' http://www.robvanderwoude.com ' Error handling code written by Denis St-Pierre Dim objIE ' Create an IE object Set objIE = CreateObject( "InternetExplorer.Application" ) ' Specify some of the IE window's settings objIE.Navigate "about:blank" objIE.Document.title = "Input required " & String( 100, "." ) objIE.ToolBar = False objIE.Resizable = False objIE.StatusBar = False objIE.Width = 320 objIE.Height = 180 ' Center the dialog window on the screen With objIE.Document.parentWindow.screen objIE.Left = (.availWidth - objIE.Width ) \ 2 objIE.Top = (.availheight - objIE.Height) \ 2 End With ' Wait till IE is ready Do While objIE.Busy WScript.Sleep 200 Loop ' Insert the HTML code to prompt for user input objIE.Document.body.innerHTML = "
" & myPrompt _ & "
" & vbCrLf _ & "" & vbCrLf _ & "" _ & "