Skip to content
⌘ NSIS Forum Archive

Weird problem with $INSTDIR

3 posts

Raven83#

Weird problem with $INSTDIR

Ran into this seemigly weird problem of $INSTDIR value going blank after a set of statements, the following is the scenario in which this happens,

strcpy $INSTDIR $INSTDIRCOPY ; copying instdir variable to a dummy var

do some stuff with $INSTDIRCOPY

messagebox MB_OK "Install path is $INSTDIR" ; This pops message box which is blank which means there's no value in $INSTDIR now.

I'm not toying with $INSTDIR , other than copying it to another var $INSTDIRCOPY. Can anyone take a guess why its going blank ?? would be great thanks
sanghoang04#
You should write:
StrCpy $INSTDIRCOPY $INSTDIR

not:
StrCpy $INSTDIR $INSTDIRCOPY
because when you do this, your new var $INSTDIRCOPY (empty) will be copy to $INSTDIR.
Raven83#
thank u for pointing that out...i thought it was the othe way around should ve thought that over..thanks buddy