craigholohan Posted November 11, 2006 Share Posted November 11, 2006 Hi Guys, Is there anything in autoit that helps create a sort of installer? I have this little App that includes 2 .ini files, and a folder with images and icons that need to be in the same folder as the app. I want to package my .exe and the there files/folder to extract automatically to a predefined folder without giving the user an option to change the path/ Hope I am making sence and someone has a solution for me. Thanks in advance, Craig Link to comment Share on other sites More sharing options...
Cue Posted November 11, 2006 Share Posted November 11, 2006 FileInstall ( "source", "dest" [, flag] ) Link to comment Share on other sites More sharing options...
craigholohan Posted November 11, 2006 Author Share Posted November 11, 2006 Thanks Cue, Cant believe I could not find it in the help file, I did a search for install and still didnt see it. Anyway I had a play but still cant seem to get it to work, attached is what I am using but not sure if I need to add any includes. After saving the below as "installe.au3" I compile it and it looks like it compiles correctly as it is about 450kB file, but when I run it, it does not seem to extract anything to my temp directory, I have tried hard coding the @temp to c:\Temp but still nothing seems to happen. What stupid thing am I missing now :"> Thanks again in advance, Craig expandcollapse popup FileInstall ( "C:\MyApp\Final App\Icons\Icon1.ico", @TempDir & "\file setup\Icons\Icon1.ico",0) FileInstall ( "C:\MyApp\Final App\Icons\Icon2.ico", @TempDir & "\file setup\Icons\Icon2.ico",0) FileInstall ( "C:\MyApp\Final App\Icons\Logo1.gif", @TempDir & "\file setup\Icons\Logo1.gif",0) FileInstall ( "C:\MyApp\Final App\Icons\Logo2.gif", @TempDir & "\file setup\Icons\Logo2.gif",0) FileInstall ( "C:\MyApp\Final App\MyApp.exe", @TempDir & "\file setup\MyApp.exe",0) FileInstall ( "C:\MyApp\Final App\INI File1.ini", @TempDir & "\file setup\INI File1.ini",0) FileInstall ( "C:\MyApp\Final App\INI File2.ini", @TempDir & "\file setup\INI File2.ini",0) [END CODE] Link to comment Share on other sites More sharing options... ChrisL Posted November 11, 2006 ChrisL Active Members 1.8k Mass Spanner! Share Posted November 11, 2006 (edited) Try creating the deapest directory(s) first. DirCreate (@TempDir & "\file setup\Icons") FileInstall ( "C:\MyApp\Final App\Icons\Icon1.ico", @TempDir & "\file setup\Icons\Icon1.ico",0) FileInstall ( "C:\MyApp\Final App\Icons\Icon2.ico", @TempDir & "\file setup\Icons\Icon2.ico",0) FileInstall ( "C:\MyApp\Final App\Icons\Logo1.gif", @TempDir & "\file setup\Icons\Logo1.gif",0) FileInstall ( "C:\MyApp\Final App\Icons\Logo2.gif", @TempDir & "\file setup\Icons\Logo2.gif",0) FileInstall ( "C:\MyApp\Final App\MyApp.exe", @TempDir & "\file setup\MyApp.exe",0) FileInstall ( "C:\MyApp\Final App\INI File1.ini", @TempDir & "\file setup\INI File1.ini",0) FileInstall ( "C:\MyApp\Final App\INI File2.ini", @TempDir & "\file setup\INI File2.ini",0) One question, you have select 0 as the option for fileinstall, so if this file already exists do not overwrite it. Why would you want to do this, what happens if that file name already exists in that directory and it's not your file. Or you have an updated package with newer files, would you not want to update them? Maybe you might want to concider using 1, I know I would to be sure I had the correct files, but I guess you may have your own reason. Edited November 11, 2006 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
craigholohan Posted November 11, 2006 Author Share Posted November 11, 2006 Try creating the deapest directory(s) first. DirCreate (@TempDir & "\file setup\Icons") FileInstall ( "C:\MyApp\Final App\Icons\Icon1.ico", @TempDir & "\file setup\Icons\Icon1.ico",0) FileInstall ( "C:\MyApp\Final App\Icons\Icon2.ico", @TempDir & "\file setup\Icons\Icon2.ico",0) FileInstall ( "C:\MyApp\Final App\Icons\Logo1.gif", @TempDir & "\file setup\Icons\Logo1.gif",0) FileInstall ( "C:\MyApp\Final App\Icons\Logo2.gif", @TempDir & "\file setup\Icons\Logo2.gif",0) FileInstall ( "C:\MyApp\Final App\MyApp.exe", @TempDir & "\file setup\MyApp.exe",0) FileInstall ( "C:\MyApp\Final App\INI File1.ini", @TempDir & "\file setup\INI File1.ini",0) FileInstall ( "C:\MyApp\Final App\INI File2.ini", @TempDir & "\file setup\INI File2.ini",0) One question, you have select 0 as the option for fileinstall, so if this file already exists do not overwrite it. Why would you want to do this, what happens if that file name already exists in that directory and it's not your file. Or you have an updated package with newer files, would you not want to update them? Maybe you might want to concider using 1, I know I would to be sure I had the correct files, but I guess you may have your own reason. Thanks ChrisL, I also used you advice on using 1, it makes more sence I guess. Cheers, Craig 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