' This script gets user input, then creates a small ' executable batch file called ~myuserin.bat, ' which can be executed to yield a environment variable ' called "userin" Dim strDataTitle 'As String If Wscript.Arguments.Count <> 1 Then strDataTitle = "Enter Data" Else strDataTitle = Wscript.Arguments(0) End If strMyUserIn = InputBox(strDataTitle) Set fs = CreateObject("Scripting.FileSystemObject") ' build a path to a temp batch file strMyFileName = fs.BuildPath(Wscript.ScriptFullName & "\..", "~myuserin.bat") strMyFileName = fs.GetAbsolutePathName(strMyFileName) ' open the batch file and execute Set ts = fs.OpenTextFile(strMyFileName, 2, True) ts.WriteLine "set userin=" & strMyUserIn ts.Close