Editing batch files from input of VB.net Text Boxes

Ludwig Stockmann

New member
Joined
Nov 23, 2006
Messages
3
Programming Experience
Beginner
Hi, everybody:
I am really new to vb.net, and I need to know if there is any way to input parameters from a textbox in a 100% vb.net form to a batch file.
I have created 3 text boxes, which will allow the user to enter:
box1= ip address
box2= user name
box3= password

My goal is to get the input of these three boxes, and add them to a batch file. This batch file should be edited all the time there is input into the text boxes. The batch file reads as follows:

c:
cd\x
terminate\ipaddress(from box1) user(from box2) password(from box3) drive:\program.

Any information or reference will be more than welcomed

Thanks in advance.
 
DO you mean something like this?

VB.NET:
        Dim sr As New System.IO.StreamWriter("batchfile.bat")
          sr.WriteLine("c:")
          sr.WriteLine("cd\x")
          sr.WriteLine("terminate\ipaddress " & TXTIP.Text & " user " & _
          TXTUser.Text & " password " & TXTpass.Text & " drive:\program ")
          sr.Flush()
          sr.Close()
 
Thank you very much for your replies. The code was right what I needed, and I also read the instructions on multiple forms. I really appreciate all your help. :)
 
Back
Top