Computeristic Computeristic - 2 years ago 101 Question

Click a button --> Launch a *.exe file

Basically, what I want to do is launch an *.exe file when I click on a button. I want this done in VB.NET. I have Microsoft Visual Basic 2008 Express Edition.

The button I have is called 'btnYES'.

How can I launch an *.exe file from the click of this button?

Answer Source

In the event handler of the button call


You will find further samples in the MSDN documentation for Process.Start().

In case you don't know how an event handler is created: Simply open the form in the designer and double-click on the btnYes button. This will automatically create an event handler for the button click event and the IDE will open the code file for you at the correct position.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download