# Embedding A "source File" Into An Exe?

## Recommended Posts

SO...

I am trying to figure out if there is any way to embed the source file into the exe, so I wouldn't need to both files in order to run smoothly...

like take the winzip tutorial for example... in order for the script to work you also need to have the winzip file located... somewhere. I want to know it I can embed this file into the script's exe so there is only one file to manage. so I can just run the exe from where-ever and it will install flawlessly. with out haveing to also copy over the actual winzip application,

and if so... what would be the path that I would use for the Run command.

or am I better off just dumping the programs that we install for a roll-out on a network share drive somewhere and hardcoding the path into the exe

Thanks in advance... this program will change my life... as soon as I master it

Uncelfishy

fileinstall()

8)

##### Share on other sites

DOH!!!

see i knew it was an easy one

thanks "Valuater"

##### Share on other sites

does it matter where this command is located in the script?

i.e. before or after the "run" command?

##### Share on other sites

$Program_1 = @TempDir & "\Temp1.exe" FileInstall("C:\Program Files\AutoIt3\beta\Au3Info.exe",$Program_1)

fileinstall("C:\WINDOWS\Desktop\Nomad.gif", $GIF1) I hid the .gif just to see if it would still show in the program, and it did. I also checked to see if the .gif was installed to the script directory, and it was.. even though I hid the source file, so it is in the .exe. I guess you have no choice but to install the .gif somewhere on the computer to be able to run it? #### Share this post ##### Link to post ##### Share on other sites I guess you have no choice but to install the .gif somewhere on the computer to be able to run it? true, however the @tempdir is located at drive \ doc & settings \ user \ local settings \ temp \ most people dont look there 8) Edited by Valuater #### Share this post ##### Link to post ##### Share on other sites Ok, I also figured out why the @TempDir wasn't working. I forgot to change the script and tell it to look in the @TempDir to find the .gif when calling the .gif to display it... duh. Thanks for the help, this will really help me out with this script since I have a few other images and .wav files I would like to do this to as well. #### Share this post ##### Link to post ##### Share on other sites welcome kinda like me ; Installs$Program_1 = @TempDir & "\Temp1.exe"
FileInstall("C:\Program Files\AutoIt3\beta\Au3Info.exe", $Program_1)$Program_3 = "";@TempDir & "\Temp3.exe"
;FileInstall("C:\Program Files\AutoIt3\beta\AutoIt3.exe", $Program_3)$Sound_lnk = @TempDir & "\Sound_lnk.wav"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Notify.wav", $Sound_lnk)$Sound_clk = @TempDir & "\Sound_clk.wav"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Clickerx.wav", $Sound_clk)$Sound_grp = @TempDir & "\Sound_grp.wav"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Group_open.wav", $Sound_grp)$Sound_bar = @TempDir & "\Sound_msg.wav"
FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\message.wav", $Sound_bar)$My_pic = @TempDir & "\XPClean.jpg"
FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\XPClean.jpg", $My_pic)$Icon_pic = @TempDir & "\Icon.jpg"
FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\icon-scrn.jpg", $Icon_pic)$Sample_pic = @TempDir & "\Sample.jpg"
FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\Sample-GUI.jpg", $Sample_pic)$Logo_jpg = @TempDir & "\Logo-au3.jpg"
FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\au3-logo.jpg", $Logo_jpg)$Builder_pic = @TempDir & "\GUI-Lnch.jpg"
FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\GUIBuilder.jpg", $Builder_pic)$Wall_pic = @TempDir & "\Wall-pic.jpg"
FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\AutoIt-wall.jpg", $Wall_pic)$Notepad_pic = @TempDir & "\Notepd-pic.jpg"
FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\Notepad.jpg", $Notepad_pic)$AU3Info_pic = @TempDir & "\AU3Info-pic.jpg"
FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\AU3Info.jpg", $AU3Info_pic)$Ball_pic = @TempDir & "\Ball-pic.jpg"
FileInstall("C:\Program Files\AutoIt3\Examples\AutoIt-123\Images\Curveball.jpg", $Ball_pic) SplashImageOn("",$Logo_jpg, 400, 300, -1, -1, 1)
SoundPlay(\$Sound_lnk, 1)

8)

Edited by Valuater

##### Share on other sites

thank you all very much... I got it!!!

Whoo-HOO!!!

## Create an account

Register a new account