Open Process and specify working directory
I need to open a process that is very old and is designed to use a windows command window. This is the code that I have so far:
VB Code:
dbaSrv.StartInfo.FileName = "myProcess.exe"
dbaSrv.StartInfo.UseShellExecute = False
dbaSrv.StartInfo.WorkingDirectory = "c:\temp"
dbaSrv.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Minimized
dbaSrv.Start()
This will start to open the process but then the process crashes because the working directroy is not correct. This code will work fine if I place my VB executable in the directory that I need to be the working directory. I guess that my question is how do I define a working directory before I launch my process?