Help Needed =/[Solved]

Posts 110 of 10 · Page 1 of 1
Help Needed =/[Solved]
Well if i typed a directory in a TextBox and clicked a button to run the file from directory , how would i do that? Can some one post a source here?

Example:

Textbox1 + 1 Button

Textbox1.Text = "C:\upx.exe"

How would i start the program by clicking Button1?

Source = Rep + thank
Process.Start(xxxxxxx)
Process.Start("Textbox1.Text")

Naw tried that already.
Quote Originally Posted by -0x00 View Post
Process.Start("Textbox1.Text")

Naw tried that already.
like that guy said.. try it without the quotes.. obviously.. -.-
try with out the quotes
Nevermind i got it.

Code:
       Dim pid As Long


        ' Start the program.
        pid = Shell(TextBox1.Text, vbMinimizedNoFocus)
        If pid = 0 Then
            MsgBox("Error starting program")
            Exit Sub
        End If
Quote Originally Posted by -0x00 View Post
Nevermind i got it.

Code:
       Dim pid As Long


        ' Start the program.
        pid = Shell(TextBox1.Text, vbMinimizedNoFocus)
        If pid = 0 Then
            MsgBox("Error starting program")
            Exit Sub
        End If



.
Shell(xxx)

is kinda better then

Process.start(xxx)

in my opinion
Quote Originally Posted by cosconub View Post
Shell(xxx)

is kinda better then

Process.start(xxx)

in my opinion
the difference is that it returns a process id
Mkay. Solved, no more posting unless necessary.
Posts 110 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?