Archive: Missing colon in $INSTDIR


Missing colon in $INSTDIR
$1 holds my path i.e C:\Program Files\Prog. When I do a StrCpy $INSTDIR $1, my $INSTDIR holds C\Program Files\Prog.
Why isnt the colon there?

I even tried setting the $INSTDIR using a ReadRegStr, but also here the colon is missing.

I am using NSIS 2.0

Anyone have an idea??

Regards
Soren


It was surgically removed due to unregulated cell multiplication.


Missing colon in $INSTDIR
How do I maintain the $INSTDIR then? My problem is that I must support command line install and I use a function to handle command line parameters and then put them into $INSTDIR. Is there a way around this?

/Soren


RobGrant was trying to make a joke which I think you took literally. Rob, please post constructively else people will just get confused (especially non-native English speakers.)

This must be a bug? I've never had this problem...

Edit: Now I think I might know the problem. You can't have ":" in directory/file names and so NSIS is stripping all invalid characters from the path before setting $INSTDIR to it. But whoever coded it probably forgot you can have ":" for drives.

This has been fixed in NSIS 2.01. Tried it myself and it works:

StrCpy $1 "C:\progra~1\NSI:S"
StrCpy $INSTDIR $1
DetailPrint $INSTDIR

This outputs "C:\progra~1\NSIS".

So basically you should get the latest CVS snapshot (or get the last final build 2.01).

-Stu


This is not a bug. It is by design. $INSTDIR is a validated path.

The validation of your $INSTDIR probably removed the colon because you have something else before "C:". Try creating a minimal example to reproduce this. If you won't find the problem while creating it, I'm sure someone else will be able to help you spot it.