- Home /
Question by
Wolgraph · Mar 25, 2019 at 04:37 PM ·
error messageexternal-applicationfilepath
Can't execute external program
Hi. I'm trying to exectute an external program, because of an operation that makes Unity crash. Here's the code I wrote
{
//Get the support program directory
string AssetsPath = Application.dataPath;
DirectoryInfo parentDir = Directory.GetParent(AssetsPath);
string ProjectPath = parentDir.Parent.FullName;
//Call for the external process
Process Support = new Process();
Support.StartInfo.WorkingDirectory = ProjectPath + @"Supportprogram\External Context\External Context\bin\Debug\";
Support.StartInfo.Arguments = file;
Support.StartInfo.FileName = "External Context.exe";
Support.Start();
Support.WaitForExit();
}
As Input I chose a file and the program has to convert it in another format. Once I run the game and choose the file to use, It returns me this error:
Unable to start program 'c:\..........exe'. The system cannot find the file specified.
Do someone have any hint how to solve this problem?
I created a new Consol app (.net framework) with visual studio, Into the Unity project folder. Next to he Asset Folder.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612194248im_/https://answers.unity.com/themes/thub/images/avi.jpg)