0

I added a new source (.exe) to my program. in the folder "Programs".

In a new process I want to do something like:

Process openProgram = new Process();
openProgram.FileName = "WpfApplication;Resources/Programs/myProgram.exe"

Obviously this is not working but can someone push me in the right direction and explain WHY this is impossible?

myProgram is set as Resource and Copy Always The Folders I Mentioned are NOT on my computer but in my application.

Regards

Nick Prozee
  • 2,823
  • 4
  • 22
  • 49
  • possible duplicate of [How to run external program via a C# program?](http://stackoverflow.com/questions/3173775/how-to-run-external-program-via-a-c-sharp-program) – gleng Dec 10 '13 at 15:40
  • Those programs are by default installed on the computer and Extracted to it. I do not want to extract "myProgram" but run it directly from within my application – Nick Prozee Dec 10 '13 at 16:12
  • Do you want to start a new process from file which does not exist? It's impossible. String you assigned to `openProgram.FileName` is not file name, but resource URI (which can be resolved by your wpf application, but not by OS). You need to extract .exe file somewhere to target PC (i.e. temp folder) and start it from that location. – tom.maruska Dec 12 '13 at 22:03
  • Thanks for the Info, how do I extract this? – Nick Prozee Dec 12 '13 at 22:35

0 Answers0