problems using System.Diagnosics.Process.Start to start Process
-
Hi, sorry for posting again, but problem hasn't been solved jet. I know this might be difficult, but perhaps somebody knows: my starting routine looks like this: private void StartProcess() { System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.FileName = "C:\\Programme\\AutoGK\\AutoGK.exe"; p.Start(); } When I run the code everything is executed fine except that the application to be started shows me an error: "Installation is corrupted. Please reinstall the application." BTW: The code works with any ohter application I have tested so far. But starting the app (AutoGK) manually (in windows explorer via double click, etc.) causes no errors and the application starts fine. The program I want to start is AutoGordianKnot, which probably was written in Qt. Any suggestions? Greetings
-
Hi, sorry for posting again, but problem hasn't been solved jet. I know this might be difficult, but perhaps somebody knows: my starting routine looks like this: private void StartProcess() { System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.FileName = "C:\\Programme\\AutoGK\\AutoGK.exe"; p.Start(); } When I run the code everything is executed fine except that the application to be started shows me an error: "Installation is corrupted. Please reinstall the application." BTW: The code works with any ohter application I have tested so far. But starting the app (AutoGK) manually (in windows explorer via double click, etc.) causes no errors and the application starts fine. The program I want to start is AutoGordianKnot, which probably was written in Qt. Any suggestions? Greetings
What happens if you run that command from the command line?
Tech, life, family, faith: Give me a visit. I'm currently blogging about: And in this corner, the Party of Allah The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
Hi, sorry for posting again, but problem hasn't been solved jet. I know this might be difficult, but perhaps somebody knows: my starting routine looks like this: private void StartProcess() { System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.FileName = "C:\\Programme\\AutoGK\\AutoGK.exe"; p.Start(); } When I run the code everything is executed fine except that the application to be started shows me an error: "Installation is corrupted. Please reinstall the application." BTW: The code works with any ohter application I have tested so far. But starting the app (AutoGK) manually (in windows explorer via double click, etc.) causes no errors and the application starts fine. The program I want to start is AutoGordianKnot, which probably was written in Qt. Any suggestions? Greetings
Is your application being run from a different user account than your are developing? That could cause an issue, esp with ASP.NET.
A man said to the universe: "Sir I exist!" "However," replied the Universe, "The fact has not created in me A sense of obligation." -- Stephen Crane
-
What happens if you run that command from the command line?
Tech, life, family, faith: Give me a visit. I'm currently blogging about: And in this corner, the Party of Allah The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
Is your application being run from a different user account than your are developing? That could cause an issue, esp with ASP.NET.
A man said to the universe: "Sir I exist!" "However," replied the Universe, "The fact has not created in me A sense of obligation." -- Stephen Crane
-
Hi, sorry for posting again, but problem hasn't been solved jet. I know this might be difficult, but perhaps somebody knows: my starting routine looks like this: private void StartProcess() { System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.FileName = "C:\\Programme\\AutoGK\\AutoGK.exe"; p.Start(); } When I run the code everything is executed fine except that the application to be started shows me an error: "Installation is corrupted. Please reinstall the application." BTW: The code works with any ohter application I have tested so far. But starting the app (AutoGK) manually (in windows explorer via double click, etc.) causes no errors and the application starts fine. The program I want to start is AutoGordianKnot, which probably was written in Qt. Any suggestions? Greetings
What happens if you do
p.StartInfo.UseShellExecute = true;
?Tech, life, family, faith: Give me a visit. I'm currently blogging about: And in this corner, the Party of Allah The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
Hi, sorry for posting again, but problem hasn't been solved jet. I know this might be difficult, but perhaps somebody knows: my starting routine looks like this: private void StartProcess() { System.Diagnostics.Process p = new System.Diagnostics.Process(); p.StartInfo.FileName = "C:\\Programme\\AutoGK\\AutoGK.exe"; p.Start(); } When I run the code everything is executed fine except that the application to be started shows me an error: "Installation is corrupted. Please reinstall the application." BTW: The code works with any ohter application I have tested so far. But starting the app (AutoGK) manually (in windows explorer via double click, etc.) causes no errors and the application starts fine. The program I want to start is AutoGordianKnot, which probably was written in Qt. Any suggestions? Greetings
There is a chance that the AutoGK application is looking for some support file and cannot find it when started from a .NET app. When started from explorer or from the command-line, it is able to find support files automatically. Explorer knows where to look for support files as an app is always configured with a startup directory. Starting from a .NET app it may not know where it's home directory is (i.e., there maybe some Field that needs to be set to tell it where it's home directory is). Just a thought.
-
What happens if you do
p.StartInfo.UseShellExecute = true;
?Tech, life, family, faith: Give me a visit. I'm currently blogging about: And in this corner, the Party of Allah The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
There is a chance that the AutoGK application is looking for some support file and cannot find it when started from a .NET app. When started from explorer or from the command-line, it is able to find support files automatically. Explorer knows where to look for support files as an app is always configured with a startup directory. Starting from a .NET app it may not know where it's home directory is (i.e., there maybe some Field that needs to be set to tell it where it's home directory is). Just a thought.