Old 24th May 2011, 18:24   #1
hanenjom
Member
 
Join Date: Apr 2011
Posts: 56
strcpy $INSTDIR

please, can you help me

I have a problem with $INSTDIR, I extract the path from a file, then I do the copy at $INSTDIR,

for example my path is "C:\blabala" when I do

StrCpy $INSTDIR "$path", I have $INSTDIR = "C\blabala"

otherwise said the ":" disappears and consequently I have a wrong path.


Why i don't now.
please help me.
thx
hanenjom is offline   Reply With Quote
Old 24th May 2011, 18:27   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
code:
StrCpy $R0 c:\blah
StrCpy $INSTDIR $R0
DetailPrint $INSTDIR

This works fine for me. Check your $path variable contents. Alternatively, don't use $path at all (you can use $INSTDIR directly).

Stu
Afrow UK is offline   Reply With Quote
Old 24th May 2011, 22:33   #3
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
http://forums.winamp.com/showthread.php?t=200021
jpderuiter is offline   Reply With Quote
Old 24th May 2011, 22:35   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,548
Are you sure the path is not " c:\blah" (starting with a space), $instdir has some special handling to validate the path, you can't just copy any random string into $instdir

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 25th May 2011, 09:25   #5
hanenjom
Member
 
Join Date: Apr 2011
Posts: 56
re

Thx , for you answers,
my problem was , the path started with space " C:\blabla". i must just remove this space

thx.
hanenjom is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump