Problem with Process.Start

davearia

Centurion
Joined
Jan 4, 2005
Messages
184
Hi,

I am trying to programmatically start up an exe. Here is a basic example of starting up an exe in my application folder which works fine:

Visual Basic:
Process.Start("my.exe", My.Application.Info.DirectoryPath)

Here is an attempt to specify the location:

Visual Basic:
Process.Start("my.exe", "C:\Documents and Settings\me\Desktop\new\new\Bin")

Which throws an exception, as it cannot find the file.

I tried this:

Visual Basic:
If File.Exists(appPath & "my.exe") Then
    Dim processInfo As New ProcessStartInfo
    processInfo.FileName = "my.exe"
    processInfo.Arguments= "C:\Documents and Settings\me\Desktop\new\new\update\Bin"
    Process.Start(processInfo)
End If

But again I get
The system cannot find the file specified

Can anyone help?

Thanks, Dave.
 
Sorry just realised I wasted my time posting this. The file name just needed the path adding to it. Apologies!
 
Back
Top