Archive: InstallDir


InstallDir
Hi,

i have a script that installs a modified mirc client... now when another mirc client is installed already it uses this path instead my given path.... how can i change that it always gives my path in entrybox?

Cheers
SNap


Are you using InstallDirRegKey?
If so, then you want to use your own registry entry instead.

Something like this:


!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPre
!insertmacro MUI_PAGE_DIRECTORY

Function DirectoryPre

ReadRegStr $INSTDIR HKLM "Software\Modified_mIRC_Client" "InstallDirOrWhateverItIs"
StrCmp $INSTDIR "" 0 +2
ReadRegStr $INSTDIR HKLM "Software\Normal_mIRC_Client" "InstallDirOrWhateverItIs"

FunctionEnd


So it will check if your registry entry is there before using one supplied from previous mIRC installation.
Remember to WriteRegStr to your registry key and not the original one as well.

-Stu