gte806e
3rd August 2004 22:04 UTC
StrCmp syntax please?
I've read over the help for this and still i'm a bit unclear.
I want to parse the $INSTADIR and return it without the leading drive letter and semicolon.
Now the idea was to use StrCpy to remove the c:\
so I have
StrCpy $objPath $INSTDIR 2
delete "$APPDATA\Macromedia\Flash Player\localhost\$objPath"
Which my hope i'd be deleting
C:\Documents and Settings\jedwards\Application Data\Macromedia\Flash Player\localhost\Program Files\appname\
But I keep getting errors on StrCpy. Please help!
Joel
3rd August 2004 23:13 UTC
mmm, something like this:
SetCompressor lzma
XPStyle on
Name "Lobo Lunar"
OutFile "Test.exe"
BrandingText "Lobo Lunar"
InstallDir "$EXEDIR"
ShowInstDetails show
Section "-default"
DetailPrint $EXEDIR
Strlen $0 $EXEDIR
IntOp $0 $0 - 2
StrCpy $R0 $EXEDIR $0 3
DetailPrint $R0
SectionEnd
gte806e
3rd August 2004 23:18 UTC
Figured it out, the var name was the problem. But why the heck cant I use a var name with more than one character??
$1 worked
$objPath didnt
WHY!?
:)
Joel
3rd August 2004 23:29 UTC
did you put, before $objPath, something like this:
Var objPath
Afrow UK
4th August 2004 13:28 UTC
You need to define custom variables before compile, so insert Lobo Lunar's code at the top of your script (outside any Section's & Function's)
-Stu
gte806e
6th August 2004 21:14 UTC
Thanks guys =)