Ncharbonneau 0 Posted March 17, 2011 (edited) Hello,I know that it is the purpose of FileInstall to include in the compile file the referenced file.I use a script to install company software. This has 2 functions: create a download evaluation executable for company website and an evaluation CD-ROM.Basically, the 2 functions are really similar, but in the case of: - evaluation.exe : all files are included in the executable then unzipped locally using FileInstall - installation.exe : All files are in a directory of my CD-ROM so doesn't need to be included it the executable.my first thought was to use a variable in my code when compiling:dim $evaluation = 1 or 0If ($evaluation =1 ) FileInstall(....)endBut all files are included in the executable even if $evaluation = 0I think I should create 2 scripts..Do you have another solution, so I won't have to maintain 2 different scripts, so I've got it all-in-1??ThanksNicolas Edited March 17, 2011 by Ncharbonneau Share this post Link to post Share on other sites
iamtheky 927 Posted March 17, 2011 all-in-1 = all files are included in the executable even if $evaluation = 0It just may not need to deploy them depending on the configuration. At least in my head. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Share this post Link to post Share on other sites
Chimaera 144 Posted March 17, 2011 Me personally i would lean towards 2 scripts as i usually find they tend to evolve differently depending on the needs. At least that way you can simply change things when you need to C If Ive just helped you ... miracles do happen. ChimaeraCopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Share this post Link to post Share on other sites
Zedna 279 Posted March 18, 2011 My idea for such request is using include files. So you can create main script and two include files evaluation/install. When you want to compile one type of EXE just comment one line with include statement and compile. Resources UDF ResourcesEx UDF AutoIt Forum Search Share this post Link to post Share on other sites
willichan 220 Posted March 18, 2011 Use FileInstall() for anything that you want to be "compiled into" the script, and FileCopy() for anything that will be included on the CD but does not need to be "compiled into" the script. Join me in supporting Pediatric Therapy Network through Amazon Smile. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator Share this post Link to post Share on other sites
Ncharbonneau 0 Posted March 18, 2011 My idea for such request is using include files.So you can create main script and two include files evaluation/install.When you want to compile one type of EXE just comment one line with include statement and compile.Zedna,I'v moved my specific functions to another autoit file and I call then when required using an include statement.Simple, efficientThanks Share this post Link to post Share on other sites