Archived

This topic is now archived and is closed to further replies.

ogracian

Could be possible to add an EXE file as resource...

Recommended Posts

Hi, I am just wondering if could be possible to add an EXE file to my current coude as a Resource, and if yes how can I do to run it from my code, must I use ShellExecute ? For Example: I have an EXE app which I want to run but it need some kind of arguments like -windowed, etc, so I want to do some kine of launcher menu (a kind of BAT file) to handle all the initialization and then when I start my EXE, the launcher exit. PS: I am using Visual C++ 6.0 Thanks in advice. Best Regards!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Out of curiosity, why can''t you just CreateProcess() the exe file? Is there a particular reason that you need to have the EXE as part of your resource( ie, guaranteed exsistance )?

You can add any file to the resource by importing the file into the project( In the resource View, r-clk, import, then browse to your file ). It may be necessary to create a custom resource type.

One method for running this file would be to load the resource, create a file from it, and then call CreateProcess() [ admittedly, this isn''t a very good solution ].

Soon to come, a more creative method


Share this post


Link to post
Share on other sites
Thanks for your replay, about that I just want to keep one single EXE in my application dir, so that the reason I want to put the other needed EXE inside my Aplication''s exe. I will try with CreateProcess(), Thanks.

Best Regards1

Share this post


Link to post
Share on other sites
Hi, and thnaks for your suggestions, but I really apreciate if you could give me a more solid point, I mean some little example about your idea. Thanks

Best Regards!

Share this post


Link to post
Share on other sites