youtuber Posted July 7, 2019 Share Posted July 7, 2019 (edited) How to write this code in C++ ? FileInstall("Test.exe", @ScriptDir & "\Test.exe", 1) FileDelete(@ScriptDir & "\Test.exe") Edited July 7, 2019 by youtuber Link to comment Share on other sites More sharing options...
Developers Jos Posted July 7, 2019 Developers Share Posted July 7, 2019 (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 July 7, 2019 by Jos youtuber 1 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 More sharing options...
youtuber Posted September 11, 2019 Author Share Posted September 11, 2019 Well thanks, Can't I FileInstall() with AutoItX3.dll and AutoItX3_x64.dll? Link to comment Share on other sites More sharing options...
spudw2k Posted September 11, 2019 Share Posted September 11, 2019 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. youtuber 1 Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
TheDcoder Posted September 11, 2019 Share Posted September 11, 2019 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 youtuber 1 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 More sharing options...
Developers Jos Posted September 11, 2019 Developers Share Posted September 11, 2019 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 youtuber 1 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now