Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   File Problems (http://forums.winamp.com/showthread.php?t=270892)

suryakiran 9th May 2007 10:27

File Problems
 
Hello all,
I'm a newbie to NSIS. I'm trying to create an installer.

I've to install some dll files and I'm doing this.

File \path\to\directory\filename.exe

This works fine.

but if i save \path\to\directory in a variable

Var /GLOBAL path
StrCpy $path "\path\to\directory"

and then use File like this

File $path\filename.exe

This fails. NSIS compiler complains that no file with the name $path\filename.exe exists.

How can i pass user defined variables to File.

I've even tried File ${path}\filename.exe.

This also did not work.

Please help me out.

Thanks,
Surya

Afrow UK 9th May 2007 10:31

You are confusing run time variables with compile time constants. File is a compile time instruction and the value of $path is only set on run time and therefore your code will not work.

Use !define instead for compile time constants.

Stu


All times are GMT. The time now is 05:38.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.