<mr*******@yahoo.co.ukwrote in message
news:24**********************************@w40g2000 hsb.googlegroups.com...
Hi,
I need to create a GUI that has a form, on the form it asks for
username. I therefore decided to use Visual Basic (not much
experience_ On the form will be a button, how do I get this button to
then launch a vbscript, oe even a batch file when it is clicked?
Thanks.
What you are looking for is the Process class.
There are several versions of Process.Start. If the filename extension is
known to windows you can use the simple one by just using the name of the
file you want to start (acts like a double click in explorer).
If you have parameters there is a version where you give the filename
followed by a string with the parameters.
It would be something like (not a workstation with VS).
dim p as Process
p=Process.Start("C:\my folder\my batchfile.bat")
p.WaitForExit()
the last statement will wait until the process finishes if this is important
to what you are doing.
Hope this helps
LLoyd Sheen