Archive: Problems with '.onVerifyInstDir'


Problems with '.onVerifyInstDir'
hi there!

i've got some problems with '.onVerifyInstDir'...
here's a part of the code i am using:

---
Function ".onVerifyInstDir"
IfFileExists $INSTDIR\Winamp.exe Good
MessageBox MB_YESNO|MB_ICONQUESTION \
"This is not your Winamp Directory, install anyway?" \
IDYES Process
Abort
Process:
Good:
FunctionEnd
---

i want to make shure that the plugin is installed in the winamp directory. but, if the user wants so, he should be able to install it into another dir.
the code i am using causes some strange behaviour: it lets the installer prompt two times "This is not your Winamp Directory, install anyway?" when changing the directoy via the folder-tree. it's pretty annoying... ;-)

so, if anybody out there could help me solve this prob i would be really happy.


greets,
marcel.


This is a known issue. You can avoid it by reading the winampdir from registry (see functions.htm). Set $INSTDIR to this dir. Then display the dirselection page. Now users can still change the dir, but the default dir will be the winamp dir.

Hope this helps, good luck,
-Hendri.


ok, thanks anyway ;)