Old 13th May 2011, 19:05   #1
JohnChen
Member
 
Join Date: Mar 2011
Posts: 80
A question regarding File

If I use File like this,

File $0

Here $0 is clearly defined as some existing file with full path. I confirm that by printing out $0. But I got an error "File: "$0" -> no files found.". What went wrong? Thanks.
JohnChen is offline   Reply With Quote
Old 13th May 2011, 19:15   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
This is very basic stuff. File is a compile-time instruction and requires a file path that is valid at compile time. How can you give it a variable when the variable's value is only determined at run-time? It is logically impossible.

Edit: If you are trying to copy files rather than compress them into the installer executable, use CopyFiles.
Edit #2: If you want to extract as a file name/path stored in a variable, use "/oname=$0". The manual clearly demonstrates this.

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump