Jump to content

FileInstall C++ equivalent?


youtuber
 Share

Recommended Posts

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • 2 months later...

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.

Link to comment
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 :)

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

  • Developers
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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...