|how does this work with a menu in a batch file? |
would someone write me an example for it because i cant seem to get it to work.
code is below
'call' command to call for the vbscript file which should be in the same folder as the .bat file.
in the batch file pretty much anywhere you can start the vbscript, and call another
.bat file- using @ to of course not echo the line of code -
@ start /w wscript.exe userin.vbs
@ call ~anyname.bat
@ del ~anyname.bat
now for the .vbs file : create userin.vbs using a text editor such as notepad -
strUserIn = InputBox("This is the the input box will say")
Set fs = CreateObject("Scripting.FileSystemObject")
strFileName = fs.BuildPath(Wscript.ScriptFullName & "\..", "~anyname.bat")
strFileName = fs.GetAbsolutePathName(strFileName)
Set ts = fs.OpenTextFile(strFileName, 2, True)
ts.WriteLine "set userin=" & strUserIn
Now we use what ever was typed in to execute a command.
So any dos/batch command that makes sense will fit there
[code]@ Batch/doscommand -A %USERIN%