Archive: verify there are no blanks in $INSTDIR


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



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

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


Yes can go there or in the leave function.

Stu