Includes the specified file inside the compiled version of the script.
FileInstall Source, Dest , Overwrite
The name of the file to be added to the compiled EXE. The file is assumed to be in (or relative to) the script's own directory if an absolute path isn't specified.
The file name must not contain double quotes or wildcards. In addition, this parameter must be listed to the right of the FileInstall function (that is, not on a continuation line beneath it).
When Source is extracted from the EXE, this is the name of the file to be created. It is assumed to be in A_WorkingDir if an absolute path isn't specified. The destination directory must already exist.
Type: Integer (boolean)
This parameter determines whether to overwrite files if they already exist. If this parameter is 1 (true), the function overwrites existing files. If omitted or 0 (false), the function does not overwrite existing files.
An exception is thrown on failure.
This function is a directive for the Ahk2Exe compiler that allows you to add extra files to the resulting compiled script. Later, when the compiled script is run, the files are extracted back out onto the disk.
The file is added during script compilation. When the compiled script is executed and the same "FileInstall" function is reached, the file is then extracted to Dest.
Files added to a script are compressed and also encrypted.
If this function is used in an normal (uncompiled) script, a simple file copy will be performed instead -- this helps the testing of scripts that will eventually be compiled.
FileInstall "C:\My Documents\My File.txt", A_ProgramFiles "\My Application\Readme.txt", 1