eynstyne Posted February 17, 2006 Share Posted February 17, 2006 FileInstall() seems to always refer to my hard drive. When I take my USB drive with me to an Internet Cafe or something, I can no longer install the bitmap for my splashscreen and my icons. Even when I compile my script to an EXE, it refers back to the FileInstall() Is it possible to embed a file into an EXE without having its source? I want to make an Installer for my programs. F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent] Link to comment Share on other sites More sharing options...
Valuater Posted February 17, 2006 Share Posted February 17, 2006 maybe try this $My_pic = @ScriptDir & "\My-Pic1.jpg" FileInstall("C:\Program Files\AutoIt3\MY-Pic1.jpg", $My_pic) not tested for your use... but maybe it will work 8) Link to comment Share on other sites More sharing options...
seandisanti Posted February 17, 2006 Share Posted February 17, 2006 FileInstall() seems to always refer to my hard drive. When I take my USB drive with me to an Internet Cafe or something, I can no longer install the bitmap for my splashscreen and my icons. Even when I compile my script to an EXE, it refers back to the FileInstall() Is it possible to embed a file into an EXE without having its source? I want to make an Installer for my programs.are you running a compiled script or an .au3? if you don't compile it, the installed files are not included into the exe because there isn't one. when run uncompiled, the fileinstall just copies the files to their intended destination from their original location. also, i don't think that they even overwrite if the file already exists. Link to comment Share on other sites More sharing options...
eynstyne Posted February 17, 2006 Author Share Posted February 17, 2006 So I should make a copy of my executable and then fileinstall() to it? I still think it will refer to the file in the executable code rather than embed them F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent] Link to comment Share on other sites More sharing options...
seandisanti Posted February 20, 2006 Share Posted February 20, 2006 So I should make a copy of my executable and then fileinstall() to it? I still think it will refer to the file in the executable code rather than embed themyou're wrong then. sorry, i'm trying to be direct, not rude. fileinstall() includes the file at the specified path of it's first parameter into the packaged executable which is created by compiling. once it is compiled, the reference to that file becomes a reference to the packaged file, not the source file. When the script is executed, it unpacks the stored copy of the file to the desired location (passed as second parameter). The only way that it would then try to access the file at it's original location is if you've explicity called that path later in your code, rather than the destination path. At that point it's not a matter of fileinstall() not doing as expected, but rather a matter of human error. Link to comment Share on other sites More sharing options...
eynstyne Posted February 20, 2006 Author Share Posted February 20, 2006 you're wrong then. sorry, i'm trying to be direct, not rude. fileinstall() includes the file at the specified path of it's first parameter into the packaged executable which is created by compiling. once it is compiled, the reference to that file becomes a reference to the packaged file, not the source file. When the script is executed, it unpacks the stored copy of the file to the desired location (passed as second parameter). The only way that it would then try to access the file at it's original location is if you've explicity called that path later in your code, rather than the destination path. At that point it's not a matter of fileinstall() not doing as expected, but rather a matter of human error. Ohh... I guess it was just my bad... F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent] Link to comment Share on other sites More sharing options...
seandisanti Posted February 22, 2006 Share Posted February 22, 2006 Ohh... I guess it was just my bad...no worries man, we all make mistakes. 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