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

Started by
5 comments, last by ogracian 23 years, 1 month ago
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!
Advertisement
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


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
Why not use DLL''s ?

DLL''s ? How can I use it for my pourpouse?

Thanks in addvice.


Why not use a thread?!

Magmai Kai Holmlor
- The disgruntled & disillusioned
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
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!

This topic is closed to new replies.

Advertisement