Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. problems using System.Diagnosics.Process.Start to start Process

problems using System.Diagnosics.Process.Start to start Process

Scheduled Pinned Locked Moved C#
helpquestion
9 Posts 4 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 3 Offline
    3 Offline
    3Dizard
    wrote on last edited by
    #1

    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

    J E M 4 Replies Last reply
    0
    • 3 3Dizard

      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

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      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

      3 1 Reply Last reply
      0
      • 3 3Dizard

        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

        E Offline
        E Offline
        Ennis Ray Lynch Jr
        wrote on last edited by
        #3

        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

        3 1 Reply Last reply
        0
        • J Judah Gabriel Himango

          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

          3 Offline
          3 Offline
          3Dizard
          wrote on last edited by
          #4

          If I run AutoGK.exe from command line it starts fine. No problems.

          1 Reply Last reply
          0
          • E Ennis Ray Lynch Jr

            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

            3 Offline
            3 Offline
            3Dizard
            wrote on last edited by
            #5

            No, it is not. BTW: I'm developing a usual c# windows application.

            1 Reply Last reply
            0
            • 3 3Dizard

              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

              J Offline
              J Offline
              Judah Gabriel Himango
              wrote on last edited by
              #6

              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

              3 1 Reply Last reply
              0
              • 3 3Dizard

                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

                M Offline
                M Offline
                Mike Bluett
                wrote on last edited by
                #7

                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.

                3 1 Reply Last reply
                0
                • J Judah Gabriel Himango

                  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

                  3 Offline
                  3 Offline
                  3Dizard
                  wrote on last edited by
                  #8

                  That is already the default. Setting it to false also doesn't solve.

                  1 Reply Last reply
                  0
                  • M Mike Bluett

                    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.

                    3 Offline
                    3 Offline
                    3Dizard
                    wrote on last edited by
                    #9

                    Thank you all guys. @Mike Bluett: You're right, that really helped me out. Setting the working directory for the process tells it where to look for the additional files. Thanks.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups