Jump to content
Sign in to follow this  
ZipperZ

Is there any way?

Recommended Posts

ZipperZ

Is there any way to implent another exe i to a script?

Share this post


Link to post
Share on other sites
Raindancer

or you could make a self extracting archive

you could even write the file in hex from a dllcall.

(fileinstall and SEA is smallest)

<{POST_SNAPBACK}>

Wicked things are possible with AutoIt :whistle:

Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer

Share this post


Link to post
Share on other sites
ZipperZ

there isnt any fileinstal() in my help file... :whistle:

Share this post


Link to post
Share on other sites
w0uter

Function Reference

FileInstall

--------------------------------------------------------------------------------

Include and install a file with the compiled script.

FileInstall ( "source", "dest" [, flag])

Parameters

source The source path of the file to compile. This must be a literal string; it cannot be a variable.

dest The destination path with trailing backslash. This can be a variable.

flag [optional] this flag determines whether to overwrite files if they already exist:

  0 = (default) do not overwrite existing files

  1 = overwrite existing files

Return Value

Success: Returns 1.

Failure: Returns 0.

Remarks

The FileInstall function is designed to include files into a compiled AutoIt script. These included files can then be "extracted" during execution of the compiled script if the statement is executed. Keep in mind that files such as images can greatly increase the size of a compiled script.

The source file must be a string and not a variable so that the compiler can extract the filename to include. The source cannot contain wildcards.

When this function is used from a non-compiled script, a copy operation is performed instead (to allow for easy testing pre-compilation).

Files maintain their original creation/modification timestamps when installed.

Related

#Include

Example

; Include a  bitmap found in "C:\test.bmp" with the compiled program and put it in "D:\mydir\test.bmp" when it is run

$b = True

If $b = True Then FileInstall("C:\test.bmp", "D:\mydir\test.bmp")


My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Share this post


Link to post
Share on other sites
ZipperZ

that's not what i'm wanting... I want to write script and input in it exe. Lets say i start my script it creates another exe (whitch is inside it)send command to it and delete it...

Share this post


Link to post
Share on other sites
Raindancer

that's not what i'm wanting... I want to write script and input in it exe. Lets say i start my script it creates another exe (whitch is inside it)send command to it and delete it...

<{POST_SNAPBACK}>

That is exactly what you need FileInstall() for...

Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer

Share this post


Link to post
Share on other sites
ZipperZ

Oh thanx! FileInstall("C:\test.bmp", "D:\mydir\test.bmp")

i thought it allways take test.bmp from C:\... but when i compiled..

Share this post


Link to post
Share on other sites
Raindancer

Oh thanx! FileInstall("C:\test.bmp", "D:\mydir\test.bmp")

i thought it allways take test.bmp from C:\... but when i compiled..

<{POST_SNAPBACK}>

When this function is used from a non-compiled script, a copy operation is performed instead (to allow for easy testing pre-compilation).


Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer

Share this post


Link to post
Share on other sites
seandisanti

that's not what i'm wanting... I want to write script and input in it exe. Lets say i start my script it creates another exe (whitch is inside it)send command to it and delete it...

<{POST_SNAPBACK}>

yes, that's what fileinstall() does. you give it a file and tell it where you want the file to go when the script is run. it is then included in the file. then you can include in your script a runwait() to the exe (at the known path that you specified in code) and the very next line would be filedelete("c:\myfile.blah") effectively deleting your included executable. i don't think your script can be deleted within itself, just because it's in use as it's executing and can't delete a file that's in use. I think you could create a batch file to delete your script, and just call it with a run() at the end of your script to have it delete the script and itself. not sure why you'd want to do that though...

Share this post


Link to post
Share on other sites
ZipperZ

Damn :whistle: I've didn't noticed that :dance:

thanx again

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  

×