Jump to content
youtuber

FileInstall C++ equivalent?

Recommended Posts

Posted (edited)

I assume the question is about FileInstall(), not FileDelete().

FileInstall is not a simple function and is handled in both aut2exe.exe and AutoIt3.exe:

  • aut2exe will add the file to the PE header at compilation time.
  • autoit3.exe will extract the file from the PE Header to the specified filename.

Jos

Edited by Jos

Share this post


Link to post
Share on other sites

I suspect since aut2exe is what performs the file embedding, and only compiled autoit script do the extraction, AutoItX will only do a file copy operation similar to an un-compiled script, if in fact the fileinstall is supported at all.


Share this post


Link to post
Share on other sites

FileInstall is a complex function, no way standard C++ would have support for something like it. The most portable way that I can think of is to use a small preprocessor tool/script which generates a C/C++ source file which contains your file (which needs to be embedded) in binary form in an array maybe... then you can manually use that array directly in your program to use it, or "extract" it by using one of the standard file writing functions :)


A cross-platform implementation of the AutoIt language

My contributions to the AutoIt Community ##AutoIt at freenode, real-time chat

3fHNZJ.gif

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

Share this post


Link to post
Share on other sites
13 hours ago, youtuber said:

Well thanks,
Can't I FileInstall() with AutoItX3.dll and AutoItX3_x64.dll?

No of course not, and you asking this question means you really do not understand what fileinstall does.  ;)

Jos

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

×
×
  • Create New...