2
I have an app that when trying to run with the process.start
or even direct by cmd
from Windows, does not start properly (the application itself shows error), but if I go in its folder and open the executable, it opens correctly.
Inside the application folder, there is only it and a parameter file .ini
,
I’m using the following code:
private void button_abrirr_Click(object sender, EventArgs e)
{
try {
Process.Start(@"C:\Program Files (x86)\IntegradorTEF-IP\IntegradorTEF-IP.exe");
}
catch (Exception error)
{
MessageBox.Show("Falha ao abrir arquivo!\n\n");
}
}
I believe that maybe the mistake is because it does not pull this file .ini
,
someone knows some other way to try to open the application via prompt command or C#?
Post your code as you are calling Process.Start(), it may be an error in the path.
– Tiago S
I edited the question, but the way is correct, since it tries to open the application and the error message that occurs is from the application itself opened. Other applications are opening normally, usually it’s these apps with . ini files that don’t work.
– Rodrigo
What is "going in the folder"? because by
cmd
you must be going in the folder. It doesn’t make much sense to run on Windows/File Explore and not work oncmd
.– Maniero
Is to open the folder where is located the application and open it with double click of the same mouse. By CMD I put the path, it opens but the application informs error.
– Rodrigo