brainz
14th June 2001, 09:42
A quick question ....
I'm trying to use variables as a part of the name of files that are to be installed
So let us change example1.nsi as follows:
; The name of the installer
Name "Example1"
; The file to write
OutFile "example1.exe"
; The default installation directory
InstallDir $PROGRAMFILES\Example1
; The text to prompt the user to enter a directory
DirText "This will install the very simple example1 on your computer. Choose a directory"
; The stuff to install
Section "ThisNameIsIgnoredSoWhyBother?"
; Set output path to the installation directory.
SetOutPath $INSTDIR
;Set $1 to be the location of the files to install
StrCpy $1 c:\WINNT
; Put file there
File $1\notepad.exe
SectionEnd ; end the section
; eof
When I do the compile step, I get the following :
File: "$1\notepad.exe" -> no files found.
Usage: File (/r filespec [...]|/oname=outfile one_file_only)
Am I missing something, or is my syntax wrong, or are variables not allowed in the File statement ?
Any help gratefully accepted ...
TIA
tim
I'm trying to use variables as a part of the name of files that are to be installed
So let us change example1.nsi as follows:
; The name of the installer
Name "Example1"
; The file to write
OutFile "example1.exe"
; The default installation directory
InstallDir $PROGRAMFILES\Example1
; The text to prompt the user to enter a directory
DirText "This will install the very simple example1 on your computer. Choose a directory"
; The stuff to install
Section "ThisNameIsIgnoredSoWhyBother?"
; Set output path to the installation directory.
SetOutPath $INSTDIR
;Set $1 to be the location of the files to install
StrCpy $1 c:\WINNT
; Put file there
File $1\notepad.exe
SectionEnd ; end the section
; eof
When I do the compile step, I get the following :
File: "$1\notepad.exe" -> no files found.
Usage: File (/r filespec [...]|/oname=outfile one_file_only)
Am I missing something, or is my syntax wrong, or are variables not allowed in the File statement ?
Any help gratefully accepted ...
TIA
tim