Archive: File $WINDIR\whatever.exe doesn't run. Why?


File $WINDIR\whatever.exe doesn't run. Why?
I have a problem with this NSI file. I can't understand why doesn't run:
---------------------------
Name "Test5"
Caption "Kar.ma Test 5"
OutFile "test5.exe"

InstallDir "$TEMP"

Section ""
SetOutPath $INSTDIR
; File $WINDIR\Calc.exe ; doesn't run!!!! Why???
File "c:\windows\Calc.exe" ; must be this way! Why?
SectionEnd
-------------------------
even though my $windir is C:\windows and it run in other cases. Can
anyone help me?
Kar.ma <makhellion@libero.it>


$WINDIR is the windows dir at the target system! So $WINDIR only gets a value when running the installer, not when compiling a script. So when compiling, $WINDIR is an empty string. And of course "\calc.exe" will not be found. Put the files you want to include in a seperate dir and then include them in an installer.

-Hendri.