Last post Sep 16, 2016 05:42 AM by Yohann Lu
Sep 15, 2016 11:00 PM|urpalshu|LINK
Path = ""\\\\ServicerName\\\\TFSLocation\\\\ProjectName\\\\Process.exe""
Path = "C:\\TFS\\Development\\Processes\\ProjectName\\Main\\ProjectDescription\\bin\\Debug\\ProcessEngine.exe"
process.Start() gives me an error Win32Exception was caught "The System cannot find the file specified".
Is there anything not right with the path above. If I have the exe on my C: drive Project folder. How would I pass the file name.
Why doesn't it recognize the path that I specify.
var process = new Process
FileName = fileName,
Arguments = Arguments,
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardOutput = true,
RedirectStandardError = true
EnableRaisingEvents = true
bool started = process.Start();
Sep 16, 2016 05:42 AM|Yohann Lu|LINK
I suspect the problem is that the filename you're specifying is relative to your working directory. When you set UseShellExecute = false, specifying the absolute filename of the process you want to start:
process.StartInfo.FileName = @"C:\Projects\MyProgram.exe";