I'm attempting to run a destination relative path from within a VB.NET app. I've made sure to use backslashes (rather than forward slashes), and also running the Process with the working directory set to the correct source path; still getting a The system cannot find the file specified error when trying to run it.
For example, I have (pseudo-code):
txtSource.text path = "C:\Windows\System32"
txtResult.text path = "..\notepad.exe"
Here's the Sub so far:
Private Sub btnTest_Click(sender As Object, e As EventArgs) Handles btnTest.Click
' Create the process object
Dim pRun As New Process()
' Set it to run from the Source folder (Working Directory)
.UseShellExecute = False
.WorkingDirectory = IO.Path.GetDirectoryName(txtSource.Text.Trim)
.FileName = txtResult.Text.Trim
' Wait for it to finish
Catch ex As Exception