Jump to content

Package and Deploy


Recommended Posts

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

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


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 
                
            
        
    
    
        


ChrisL
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 1.8k
                            
                                
                            
                        
                        
                    
                
            
            
                

    
    
        
Mass Spanner!
    
    

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted 
            
            
                
                    (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 by ChrisL
Link to comment
Share on other sites

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...