none
How to Start a Process in a same exe RRS feed

  • Question

  • Hello all,

     I am starting a process with   below code

    ProcessStartInfo str = new processstartinfo("abc.exe", "d:\\abc.xyz");
    Process.start(str);

    Now the problem is even abc.exe is already open, every time for new file new abc.exe is open, however that exe is supported multiple file opening in one exe

    So how can I do that for the multiple file open in same exe with processstartinfo??

    Thank you.

    Sunday, March 24, 2019 12:21 PM

All replies

  • Can not be answered, because there are too less infos.

    - Do you have the code for abc.exe? Then use parameter switches to do the right jobs on the file.

    - What is to do with the file? (read/write, filter, ...)

    Sorry.

    Sunday, March 24, 2019 1:28 PM
  • I think what you are trying to say is that you want the abc program to have a single instance. Look for articles about single-instance applications.

    The thing we need to know is how the abc program supports multiple files. Is there a way for an external program to tell abc to open another file? If not and if you cannot modify abc then it will be difficult to do.



    Sam Hobbs
    SimpleSamples.Info

    Sunday, March 24, 2019 8:45 PM
  • Hi Vimal c,

    Thank you for posting here.

    For your question, you could refer to the link below.

    https://stackoverflow.com/questions/3456228/c-sharp-launch-application-with-multiple-arguments

    If this could not help you, please provide more details about the abc.exe and parameters.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, March 25, 2019 2:30 AM
    Moderator
  • If you can tell us clearly if you are able to change the abc program then I can probably make more suggestions.

    I think that the suggestion from Wendy is for a single execution of Process.Start and I think you are asking about executing Process.Start multiple times during the execution of your program. So that the problem is how to pass a file name to an instance of abc such that the same instance of abc opens it. We need clarification of your requirements.



    Sam Hobbs
    SimpleSamples.Info

    Monday, March 25, 2019 2:55 AM