Hi all,

I am a beginner in Visual Basic. I use Visual Studio 2008.

I don't know how to solve this problem.
I would like to run a file name xyz.exe from "c:\test\number\" directory.
I have a browse button (Button3) to set the working directory ( c:\test\number\), and the path is shown in my TextBox1.
I would like to get the Run button (Button1) to run the xyz.exe file from the previously selected directory.


The code for Button3

Code:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim BrowseFolder As New FolderBrowserDialog
        BrowseFolder.ShowDialog()
        TextBox1.Text = BrowseFolder.SelectedPath
        MsgBox(BrowseFolder.SelectedPath)
    End Sub

The code for Button1

Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
               System.Diagnostics.Process.Start( "\xyz.exe")
    End Sub
Can you please help me to solve this problem?

Thank you

Poli