none
I a m c alling one exe in c folder from wpf application but ,inspite of exe looking for supporting files in c folder where exe is present it is looking in main app debug folder for files RRS feed

  • Question

  • I a m c alling  one   exe in  c  folder  from  wpf  application  but ,inspite  of  exe  looking  for  supporting  files in  c folder  where  exe  is  present  it  is  looking  in  main  app  debug  folder  for  files

      Process p = new Process();
      p.StartInfo = new ProcessStartInfo(AppDomain.CurrentDomain.BaseDirectory + "//BS4//11.0//Test//Tool.exe");
      p.Start();
      p.WaitForExit();

    I  even  changed  the  directory  to  c  drive  and  tested  but  same

    • Edited by vivek_kumar9 Wednesday, December 11, 2019 1:24 PM
    Wednesday, December 11, 2019 1:22 PM

All replies

  • Did you try to set p.StartInfo.WorkingDirectory to “C:\\...” folder and also p.StartInfo.UseShellExecute to false?

    Wednesday, December 11, 2019 7:20 PM
  • Hi,

    I made a test with your code, but I failed to reproduce your issue. It would be better if you could share us error message.Or you need to check if the exe generated by your wpf program is in the same directory as the BS4 folder.

    Best Regards,

    Alex


    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.

    Thursday, December 12, 2019 1:56 AM
    Moderator