Jump to content


Photo

FileInstall


  • Please log in to reply
3 replies to this topic

#1 beardboy

beardboy
  • Members
  • 443 posts

Posted 18 April 2004 - 02:24 AM

I'm not sure if this is a bug or not, but if you want to use FileInstall but don't want to extract the file(s) unless certain conditions are met.

The following code will not include the file in the EXE. But if you make test = 1 it will.

test = 0
if test = 1
{
  FileInstall, special.exe, c:\special.exe, 1
}

thanks,
beardboy

#2 Chris

Chris
  • Administrators
  • 10727 posts

Posted 18 April 2004 - 11:15 AM

That code works for me. For example, if I conditionally FileInstall a large file, the resulting compiled EXE is very large -- even if the condition isn't true at the time the file is compiled -- which indicates that the file is included. Then when I run the EXE, if the condition is true at that time, the file is extracted, otherwise it's not.

It's still possible there's a bug here, so maybe you can do a bit more testing to try to isolate the problem.

#3 beardboy

beardboy
  • Members
  • 443 posts

Posted 19 April 2004 - 05:55 PM

Ok I did some more testing and it looks like I am just too impatient, or need a faster computer. I always compile my scripts with the right click / compile. And when I did it with test = 0 I started it, noticed that it created the EXE and it was only 122 kb in size. Then changed test to = 1 and ran it again. Aparrently I didn't wait long enough for the first one to finish or Window just didn't refresh the size when it was finished. I was including 7 MB file so that I could see the size change and apparently with the 2nd test I waited until it finished. I purposely did this test because I ran into the same problem with an old AutoIt script which I am pretty sure I waited on that one. ;)

Anyways sorry for making you check.

thanks,
beardboy

#4 Chris

Chris
  • Administrators
  • 10727 posts

Posted 19 April 2004 - 07:03 PM

Thanks for following up on that. If you ever think there's a problem, it's probably best to err on the side of caution and report it.