Sign in to follow this  
Followers 0
t0ddie

wont compile

7 posts in this topic

FileInstall (@ScriptDir & "\test.exe",@SystemDir & "\test.exe")

this works when its just a script

why wont it compile? says invalid fileinstall() function


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites



Read the FileInstall documentation closer.

Share this post


Link to post
Share on other sites

in particular the error is around the red portion

FileInstall (@ScriptDir & "\test.exe",@SystemDir & "\test.exe")

<{POST_SNAPBACK}>

reverse that larry... it's the source that can't be variable...

damn, I said it.


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

in particular the error is around the red portion

FileInstall (@ScriptDir & "\test.exe",@SystemDir & "\test.exe")

<{POST_SNAPBACK}>

I looked in the helpfile, you got me that confused....

notice the edit:... I should have left it alone... I had it right the first time... I'm tired... Unemployment is draggin' me.

<{POST_SNAPBACK}>

I'm tired too, employment's getting to me;) or at least starting at 4:30 and ending at 4-5 two days in a row followed by another 6:30 to 5... yeah... why am I awake again?

t0ddie, here's a hint, what you're looking for in the helpfile is in big bold letters.

Edited by emmanuel

"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

i read it, but i thought it was the ENTIRE path... AND file that couldnt be a variable.....

i thought you could use a variable for part of it

my mistake, but it works before you compile it.. maybe fix that? it shouldnt work uncompiled if it doesnt work compiled.

or is there a reason for this that i am unaware of? or is it something that just isnt worth time to correct, because its not a huge deal?

either way, thanks for the help

~Todd

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

Try...

FileInstall ("test.exe",@SystemDir & "\")

The destination must be a folder with trailing backslash.

The source can't be a variable, but it maybe a absolute path or a path relative to the @scriptdir, but in this second case you should not use any macro or variant, just don't begin the path with a slash or a drive letter...

'\test.exe' is not from @scriptdir, 'test.exe' is.

In your case your script works before compiling just because the file is already in the script dir. If you move the script in an other folder it wont work anymore.

Share this post


Link to post
Share on other sites

No... it works before compiling because running non-compiled uses FileCopy() to simulate FileInstall() so the script can be tested. Also, since it's being run through a live script, it's able to resolve any variables/macros. When the compiler encounters that, however, it doesn't have any of the parsing/lexing capabilities and knows nothing of macros, so it can't find the file/directory.

Also, the destination can either be a directory or a filename. If it's a directory, it does have to have a trailing slash, otherwise, an attempt to create a file with no extension occurs.

Share this post


Link to post
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
Sign in to follow this  
Followers 0