sandman Posted March 4, 2007 Share Posted March 4, 2007 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] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 4, 2007 Moderators Share Posted March 4, 2007 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,SandmanIf 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 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. Link to comment Share on other sites More sharing options...
tAKTelapis Posted March 4, 2007 Share Posted March 4, 2007 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. Link to comment Share on other sites More sharing options...
sandman Posted March 4, 2007 Author Share Posted March 4, 2007 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] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now