I have included an executable in my project ( i.e. when you unfold the project in the Solution Explorer in VS2008, you see it along with all the other classes). This executable will need to be launched by my program. How can I retrieve its path programmatically?
Share
I’ve never done this before with executables… However, if it’s an embedded resource, you can enumerate through the list of embedded resources in your application (or refer directly to it by name), when you find the one appropriate, write it to disk, and then execute it.
To extract:
To execute:
As Daniel L points out, don’t forget to mark the resources as an ’embedded resource’.