bobheart Posted July 30, 2004 Share Posted July 30, 2004 I understand you can embedded a image file in the exe . Can you embedded any other files ? Like a bat file etc ? And how do you do it ? I need to see how it is done with a little code if you please . Thank you . Link to comment Share on other sites More sharing options...
bobheart Posted July 30, 2004 Author Share Posted July 30, 2004 Never mind I got it .. FileInstall("test3232.bat", "test3232.bat") RUN("test3232.bat") I figure it out on my own .. Link to comment Share on other sites More sharing options...
bobheart Posted July 30, 2004 Author Share Posted July 30, 2004 This is what it looks like now . FileInstall("test3232.bat", "test3232.bat") RunWait("test3232.bat","",@SW_HIDE) FileDelete("test3232.bat") Link to comment Share on other sites More sharing options...
ezzetabi Posted July 30, 2004 Share Posted July 30, 2004 (edited) Embed a .bat file sounds quite stupid to me. The only reason for wanting something like this is that you need modify it easily anytime before compiling that I guess it is not the case. I think is stupid because is much better IMNSHO just create it with a FileWrite() func. E.g. ;I made a new line every new line of the .bat for readability... It is not needed FileWrite("test3232.bat",_ ":: this is my bat file" & @crlf & _ "Cls" & @crlf & _ "dir" & @crlf & _ "::ect") RunWait("test3232.bat","",@SW_HIDE) FileDelete("test3232.bat") Edited July 30, 2004 by ezzetabi Link to comment Share on other sites More sharing options...
bobheart Posted July 30, 2004 Author Share Posted July 30, 2004 When someone does something that they have never done before how can you call it stupid ? Did I say I was going to use it ? no so ! Link to comment Share on other sites More sharing options...
ezzetabi Posted July 30, 2004 Share Posted July 30, 2004 I said that it sounded stupid to me, not that you are stupid. Anyway, sorry I really didnt mean to offend anyone. Link to comment Share on other sites More sharing options...
Nova Posted July 30, 2004 Share Posted July 30, 2004 Can u embed an exe file in an exe ? This could come in handy ! I hate having to have one exe present for another to run ! Link to comment Share on other sites More sharing options...
SlimShady Posted July 30, 2004 Share Posted July 30, 2004 Can u embed an exe file in an exe ?This could come in handy ! I hate having to have one exe present for another to run !You can embed any file. Link to comment Share on other sites More sharing options...
Nova Posted July 30, 2004 Share Posted July 30, 2004 (edited) Ok lets say u have a autoit exe called A.exe and u have another autoit exe file B.exe embedded into it so as it appears to be one exe. When A is run how would u extract B.exe to say the c:/ Edited July 30, 2004 by nova Link to comment Share on other sites More sharing options...
ezzetabi Posted July 30, 2004 Share Posted July 30, 2004 RTFM FileInstall() Link to comment Share on other sites More sharing options...
Nova Posted July 30, 2004 Share Posted July 30, 2004 OK srry I miss understood U use #include to embed a fileandfile install to extract it One other thing what the hell dose RTFM mean ? Link to comment Share on other sites More sharing options...
sugi Posted July 30, 2004 Share Posted July 30, 2004 RTFM is short for "Read The Fucking Manual" Link to comment Share on other sites More sharing options...
Nova Posted July 30, 2004 Share Posted July 30, 2004 Wow ezzetabi relax man ! By the way I cant RTFM at the moment cause IIFW (Im in fucking work) Link to comment Share on other sites More sharing options...
pekster Posted July 30, 2004 Share Posted July 30, 2004 (edited) #include to embed a file and file install to extract itNo. #include is only used to include an AutoIt source. FileInstall is the only way to include a file. The fine will be embeded in the script when it is compiled, and extracted to the destination path when the line is executed in the code. [Edit] Why can't you read the manual at work? they don't let you download any files at work? You can just download the chm helpfile and double click on it... Edited July 30, 2004 by pekster [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
ezzetabi Posted July 30, 2004 Share Posted July 30, 2004 (edited) I actually dislike the use of #include I prefere copy the functions' code I need to the botton of the script, but as pekster said it is not the same of file install. FileInstall() is needed to embed a file compiling time, when the script arrive to the FileInstall() line it extract the file to the destination for any use. Usually it is used to messing with command line programs in hidden windows. Since you can never know if the computers the script will work have or not the program you need you just FileInstall it,use it and delete it. The deletion is of course not automatic, so it is a good idea be careful and delete anything. If the fileinstall happen at the begin of the script because the installed program is needed often I usually make a special _Terminate func that deletes all installed files before Exit and I use it anytime I should need a Exit. E.g. I copyed psexec.exe just before compiling in c:\Fileinstall\psexec.exe FileInstall("c:\FIleInstall\psexec.exe",@tempdir & "\",1);Fileinstall want the trailing \ RunWait(@tempdir & "\psexec \\* cmd /c chkdsk c: /f","",@SW_HIDE) _Terminate() Func _Terminate() FileDelete(@temp & "\psexec.exe" Exit EndFunc BTW I know I need to relax... but I am quitting my job for a new life and I am quite worried... Edited July 30, 2004 by ezzetabi Link to comment Share on other sites More sharing options...
Nova Posted July 30, 2004 Share Posted July 30, 2004 BTW I know I need to relax... but I am quitting my job for a new life and I am quite worried...Never mind man just seemed a little harsh but I know how its annoying when ppl ask simple questions and it seems there just too lazy to look up the help file !I just didnt want to have to wait till I got home before checking it ! 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