Embed An EXE File Within Application

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
Googie85
Posts: 93
Joined: Tue Aug 05, 2014 10:07 am

Embed An EXE File Within Application

Post by Googie85 » Sat Jan 20, 2018 8:05 am

I am trying to embed an EXE file within my livecode application. Im sure there is many ways of doing this and I hope someone might have a direction to point me in.

Many Thanks,

Googie.

Klaus
Posts: 10110
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Embed An EXE File Within Application

Post by Klaus » Sat Jan 20, 2018 12:45 pm

Hi Googie,

"suck in:"
...
set the cBigExeFile of this stack to url("binfile:" & path_to_exe_file)
...
"Spit out":
...
put the cBigExeFile of this stack into url("binfile:" & new_path_to_exe_file)
...
:D


Best

Klaus

Googie85
Posts: 93
Joined: Tue Aug 05, 2014 10:07 am

Re: Embed An EXE File Within Application

Post by Googie85 » Sun Jan 21, 2018 12:56 am

I am not sure im following your post... I need to embed an EXE in the final compiled application EXE. Sorry if I confuse you!!!

Many Thanks,

Googie.

matthiasr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 67
Joined: Sat Apr 08, 2006 7:55 am
Location: Lübbecke, Germany
Contact:

Re: Embed An EXE File Within Application

Post by matthiasr » Sun Jan 21, 2018 1:26 am

Googie,

One way would be to copy the 2nd exe into the folder of the created standalone. IF you want to automate this then you can setup this in the standalone settings. Go to the standalone application settings, press on "Copy Files" and then on the button "Add File...". There you can add your exe.

Regards,
Matthias

Image

Googie85
Posts: 93
Joined: Tue Aug 05, 2014 10:07 am

Re: Embed An EXE File Within Application

Post by Googie85 » Sun Jan 21, 2018 1:38 am

I appreciate your help but still not what im after... I can embed it as a .WAV file but im unsure how to manipulate it. specialfolderpath and then copy to folder maybe?

Thanks alot for your help it is really appreciated...

Googie.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4452
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Embed An EXE File Within Application

Post by jacque » Sun Jan 21, 2018 5:58 pm

What Klaus posted does what you want. It stores the binary exe file data in a custom property of the stack. When you want to use the exe you have to write it to disk, which is what the "spit out" part does. Then you can launch it. It is not possible to run the binary exe data until it's in its own file.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

matthiasr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 67
Joined: Sat Apr 08, 2006 7:55 am
Location: Lübbecke, Germany
Contact:

Re: Embed An EXE File Within Application

Post by matthiasr » Sun Jan 21, 2018 6:15 pm

Ah, now i understand what Googie wanted to accomplish. That was not clear to me.
Matthias

bogs
Posts: 1811
Joined: Sat Feb 25, 2017 10:45 pm

Re: Embed An EXE File Within Application

Post by bogs » Sun Jan 21, 2018 7:55 pm

jacque wrote:
Sun Jan 21, 2018 5:58 pm
What Klaus posted does what you want. It stores the binary exe file data in a custom property of the stack. When you want to use the exe you have to write it to disk, which is what the "spit out" part does. Then you can launch it. It is not possible to run the binary exe data until it's in its own file.
At the point where you would want to launch it, I would suspect you'd have to shell out and do it from a command line, wouldn't you? Depending on how many os's you plan to try that on, it should be easy enough if I'm correct to determine the os then setup different shell statements based on switch/case or if/then.

Of course, all this IF I haven't made a mistake in my assumption.
Image

Klaus
Posts: 10110
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Embed An EXE File Within Application

Post by Klaus » Sun Jan 21, 2018 8:08 pm

jacque wrote:
Sun Jan 21, 2018 5:58 pm
What Klaus posted does what you want. It stores the binary exe file data in a custom property of the stack. When you want to use the exe you have to write it to disk, which is what the "spit out" part does. Then you can launch it. It is not possible to run the binary exe data until it's in its own file.
Thank you, Jaque! Obviously my initial posting was not as self-explaining as intended. :D

Yes, what I mean is that you store the binary EXE file inside of a custom property of your stack/standalone and then you can save it later to the users hard disk (spit out) and start it from there. Maybe the temporary folder...

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4452
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Embed An EXE File Within Application

Post by jacque » Sun Jan 21, 2018 8:26 pm

@bogs, you can just use the "launch" command.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bogs
Posts: 1811
Joined: Sat Feb 25, 2017 10:45 pm

Re: Embed An EXE File Within Application

Post by bogs » Sun Jan 21, 2018 8:49 pm

Ah, good to know Jaque, I hadn't gotten that far yet (launching external exe files).
Image

Post Reply

Return to “Windows”