Jump to content
Sign in to follow this  
mattey

Learning FileInstall()

Recommended Posts

mattey

Today i started learning file install. I dont know if i am right, but is this the correct way to go about it.

FileInstall( "Aut2exe.exe", "Aut2exe.exe" )
FileInstall( "AutoItASC.bin", "AutoItASC.bin" )
FileInstall( "upx.exe", "upx.exe" )
FileInstall( "AutoItSC.bin", "AutoItSC.bin" )

/in c:\pcinfo.au3 /out c:\myapp.exe
/in c:\tetiary.au3 /out c:\myapp.exe

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Inet.au3>
#include <pcInfo.au3>
#include <tetiary.au3>


#Region ### START Koda GUI section ### Form=C:\Documents and Settings\USER\Desktop\Forms\Form1.kxf
$Form1 = GUICreate("Form1", 337, 189, 192, 124)
$Input1 = GUICtrlCreateInput("Input1", 128, 48, 177, 21)
$Label1 = GUICtrlCreateLabel("Enter CP URL", 48, 48, 71, 17)
$Button1 = GUICtrlCreateButton("Create Child Server", 48, 104, 99, 25)
$Button2 = GUICtrlCreateButton("Exit", 176, 104, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Please I do need help.

Share this post


Link to post
Share on other sites
FireFox

Hi,

FileInstall includes the file within the executable when it's compiled, here you set the same path so there's nothing done (and no overwrite because the optional parameter is not set to 1).

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Chimaera

An example from one of mine

FileInstall(".\compile\the_logo.jpg", @TempDir & "\Stt\", 1)

Starts from script dir into compile folder and file to temp directory in a folder with an overwrite flag on the end

Edited by Chimaera

Share this post


Link to post
Share on other sites
mattey

oh

Hi,

FileInstall includes the file within the executable when it's compiled, here you set the same path so there's nothing done (and no overwrite because the optional parameter is not set to 1).

Br, FireFox.

 

Oh So first i have to get the directory i am compiling from, then compile and put in a destination? is that what you mean? could you help with a clearer example using my code. Pls.

Also is the command line arguement correct?

Share this post


Link to post
Share on other sites
mattey

An example from one of mine

FileInstall(".\compile\the_logo.jpg", @TempDir & "\Stt\", 1)

Starts from script dir into compile folder and file to temp directory in a folder with an overwrite flag on the end

 

Kindly correct using my code. Please.

Share this post


Link to post
Share on other sites
JLogan3o13

FileInstall is intended to include a file with your compiled executable. You do not need to include any of the files you have listed in your code. This should work just fine for you when compiled with F7, assuming you have the Inet, pcInfo and tetiary UDFs on your system (I do not).

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Inet.au3>
#include <pcInfo.au3>
#include <tetiary.au3>


#Region ### START Koda GUI section ### Form=C:\Documents and Settings\USER\Desktop\Forms\Form1.kxf
$Form1 = GUICreate("Form1", 337, 189, 192, 124)
$Input1 = GUICtrlCreateInput("Input1", 128, 48, 177, 21)
$Label1 = GUICtrlCreateLabel("Enter CP URL", 48, 48, 71, 17)
$Button1 = GUICtrlCreateButton("Create Child Server", 48, 104, 99, 25)
$Button2 = GUICtrlCreateButton("Exit", 176, 104, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
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
Sign in to follow this  

×