nsche
13th July 2009 18:59 UTC
verify there are no blanks in $INSTDIR
Greetings. This product rocks!! I am new to NSIS so be kind..
Because of some software my FOSS product depends on, I can have no blanks in the $INSTDIR. It looks to me as if I want to write a .onVerifyInstDir function and I should be able to adapt the slash to backslash converter from the wiki to understand the string manipulation.
Is that a reasonable approach or is there some other way to get the job done?
Thanks
Norm
Afrow UK
13th July 2009 19:09 UTC
StrLen $R1 $INSTDIR
IntOp $R1 $R1 - 1
${For} $R0 0 $R1
StrCpy $R2 $INSTDIR 1 $R0
${If} $R2 == ` `
MessageBox MB_OK|MB_ICONINFORMATION `blah blah`
Abort
${EndIf}
${Next}
Stu
nsche
13th July 2009 19:12 UTC
Thanks Stu.
I assume the code you gave would be the guts of .onVerifyInstDir. It looks a little more understandable than what I was hacking together.
Thanks again
Norm
Afrow UK
13th July 2009 19:23 UTC
Yes can go there or in the leave function.
Stu