Archive: Installation path control


Installation path control
Hi, I'm a newbie here...
This is my problem:

I need an installer that can check if the length of the installation path entered by the user is <= of a defined number. Now, this is easy, but how can i permit to the user to repeat the path entry?
For now, i use a message box and then i quit the installer...

Thanks!


you can put the messagebox in a callback.

from docs:

4.5.3 Callbacks

[...] the leave-function is called right after the user has pressed the next button and before the page is left.



if that's not enough, post again ;)


You can use the abort command in the leave function to avoid the user continuing to the next page.

Also you could use the .onVerifyInstDir function to check the path as the user is selecting it and if it is incorrect automatically disable the next button.

Vytautas


i will try
Thanks, i will try that!
However, i thimk it will be hard cause i've used the MUI and i've not used Pages...

Bye


You don't need to use MUI, although you can. I will post an example of the .onVerifyInstDir function from the docs. Hope it helps.

Function .onVerifyInstDir
IfFileExists $INSTDIR\Winamp.exe PathGood
Abort ; if $INSTDIR is not a winamp directory, don't let us install there
PathGood:
FunctionEnd

Vytautas

I feel so little... :)

THANK YOU ALL

Will i need to back? :)


If you use the .onVerifyInstDir function the user will not be able to click next if the path is of wrong length. (The function is called every time the path changes, so as they say in the docs "don't do anything silly in this function, e.g. don't use message boxes, etc.")

So no you will not have to click back.

Vytautas :)


THANKS!!!
It worked! Thank you!

Bye

PS: sorry if my english :)


mmm... I learnt some things today ;)