Sign in to follow this  
Followers 0
sandman

Is it possible to 'pack' files inside an .exe AutoIt script?

9 posts in this topic

I mean the same way all the installation files are packed inside a install exe (at least sometimes).

I can explain it a little more if you want me to.

Thanks!


[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites



Helpfile : FileInstall

Share this post


Link to post
Share on other sites

I'm sorry.. but I don't really understand the file. So when the autoit script is run, when not yet compiled, what happens?

Also when you run the exe it can only extract it to somewhere, it can't just keep it inside the exe?


[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites

I'm sorry.. but I don't really understand the file. So when the autoit script is run, when not yet compiled, what happens?

Also when you run the exe it can only extract it to somewhere, it can't just keep it inside the exe?

An alternitive is:

Opt("OnExitFunc", "endscript")
FileInstall ("SOURCE", @TempDir & "\Foldername")

Func endscript ()
    DirRemove (@TempDir & "\Foldername")
    Exit
EndFunc

Share this post


Link to post
Share on other sites

So when the autoit script is run, when not yet compiled, what happens?

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

Share this post


Link to post
Share on other sites

To add the ability to include multiple files and directories into a compiled AutoIT executable, it would be cool to write an AutoIT routine that:

Creates a file and directory list" (or array) then generates DirCreate and FileInstall statements in a separate .au3 script that can be included into the original .au3 script and compiled.

At my level of experience I think that it would only take me a few days to figure this out :whistle:

Share this post


Link to post
Share on other sites

To add the ability to include multiple files and directories into a compiled AutoIT executable, it would be cool to write an AutoIT routine that:

Creates a file and directory list" (or array) then generates DirCreate and FileInstall statements in a separate .au3 script that can be included into the original .au3 script and compiled.

At my level of experience I think that it would only take me a few days to figure this out :whistle:

http://www.autoitscript.com/forum/index.ph...c=34805&hl=

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Creates a file and directory “list" (or array) then generates ‘DirCreate’ and ‘FileInstall’ statements in a separate .au3 script that can be included into the original .au3 script and compiled.

At my level of experience I think that it would only take me a few days to figure this out… :whistle:

Use the Forum Search Button and it maybe easier. I made a tool in SendToA3X to create a generated fileinstall script and I am fairly sure that SmOke_N has posted a similar script in the Example Scripts Forum somewhere.

:)

Edit: Oh late. Too kind you are SmOke_N with suppling a link :lol:

Edited by MHz

Share this post


Link to post
Share on other sites

Use the Forum Search Button and it maybe easier. I made a tool in SendToA3X to create a generated fileinstall script and I am fairly sure that SmOke_N has posted a similar script in the Example Scripts Forum somewhere.

:whistle:

Edit: Oh late. Too kind you are SmOke_N with suppling a link :)

Yeah, but I like the A3x idea too, I didn't know you did that, I just did a Command Line one for myself the other day, would have saved some time lol.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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  
Followers 0