Jump to content
Sign in to follow this  
unclefishy

fileinstall questions

Recommended Posts

unclefishy

Hi All,

so I have this script that does some of the basic things like build a simple gui with a couple check boxes, and then it installs that proper program depending on which programs are checked... simple enough (well with a little help) :)

what i don't know... is since i want to be portable, I need to have it include the necessary files need for the program list.

and more IMPORTANTLY is that i don't quite understand when/how that command actually works...

like what actually happens when the script gets to it, other than it embeds it into the .exe

when does it extract the file? on script start up? or not until called upon?

I don't want it to extract all the files to the temp directory if it is only going to install 1 of the programs.

do i want it to be nested in the function that actually does the install?

thanks for any explanation!!

Share this post


Link to post
Share on other sites
erebus

Hello,

First of all FileInstall() does not work with variables. Which means that when you compile the scripts, all the FileInstall() files must exist, so as to be included in your EXE.

Now, these included files, will be installed on your system ONLY when your script actually CALLS a FileInstall() function. I.e.:

If $parameter = "1" Then FileInstall("blah.txt", @TempDir & "\blah.txt", 1)

If $parameter <> "1" then your file will never be actually installed on the system (although it will be included no matter what in your .EXE).

Hope this helps,

Share this post


Link to post
Share on other sites
unclefishy

this is how i have it nested... in a function. like such

Func ITEM_1()
    $Program_3 = "C:\ntst-tmp\project.exe"
    FileInstall("D:\stuff\junk\project.exe", $Program_3)
    Run($Program_3)
    
EndFunc  ;==>ITEM_1

Share this post


Link to post
Share on other sites
MHz

I have made a portable checkbox install Gui as the link will show.

http://www.autoitscript.com/forum/index.php?showtopic=44683

With my script, you just create sub folders i.e Games, Office, Ultilities... and then just add you install scripts (au3 or a3x files) that run the installers within the same directory.

Once run, the script scans for your scripts in the sub folders, you see the list in a treeview, you check what you want installed, then you press the execute button. May sound easy but your just half way there as you need to create the install scripts. A link is on the page for my SendToA3X program which can help you with the install scripts.

If not suitable then you could try a method easy for you to do perhaps.

:)

Share this post


Link to post
Share on other sites
unclefishy

nice... i learned a lot just by looking through that.

I have already created my .au3 scripts for all of the installs...

I have just built a front end for it, and tying all of them together... just trying out the gui and making it all 'centralized' and so i don't' have a bunch exe's to click run.

can i call or run an .au3 from the run("project.au3") command as long as i "#inlcude" it?

so i don't' have to do that much tweaking for the interface? i can just include the script instead of pasting them into the function

Share this post


Link to post
Share on other sites
MHz

I guess your replying to my post. There is a sample for download in post with the link that I gave with 2 small apps. Compile autorun.au3 into autorun.exe, then create sub folders, add your install scripts and installers into the sub folders and then run the autorun.exe. If your install scripts are created for automation or silent install then they should function well. :)

Autorun.exe will act as the interpreter to run your install scripts (au3 or a3x files).

Edited by MHz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×