Sign in to follow this  
Followers 0
sandman

I don't understand FileInstall.

4 posts in this topic

So I want to have the executable replace a file that is already there (an updater). I think I can just use FileDelete() and _FileCreate() to do this, but will this work? If I just use these, will it make a file? It looks like _FileCreate() was made for use with FileInstall(), but I don't know what to do!

Thanks for the help,

Sandman


[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites



So I want to have the executable replace a file that is already there (an updater). I think I can just use FileDelete() and _FileCreate() to do this, but will this work? If I just use these, will it make a file? It looks like _FileCreate() was made for use with FileInstall(), but I don't know what to do!

Thanks for the help,

Sandman

If the directory doesn't exist yet, then use DirCreate() to create it before you do the FileInstall().

If you look at the below link, the output (if you run it) shows you how to fail safe your install.

http://www.autoitscript.com/forum/index.ph...;hl=FileInstall


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Nope..

_FileCreate() states:

Creates or zero's out the length of the file specified.

I assume, this allows you to create a file if it doesn't exist.

FileInstall is the only function you need.

provide it with the file you wish to have packaged into your .exe AND the path where you want it to be put when your .exe is ran.

The flags allow you to set it to over-write a file, a flag of 0 and it will not over-write, a flag of 1 and it will.

Share this post


Link to post
Share on other sites

Oh.. ok. I must have misread that part of FileInstall(). Thanks!


[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

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  
Followers 0