Old 22nd February 2006, 14:08   #1
SNap2k
Junior Member
 
Join Date: Dec 2004
Location: germany
Posts: 7
Send a message via ICQ to SNap2k
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
SNap2k is offline   Reply With Quote
Old 22nd February 2006, 14:24   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Are you using InstallDirRegKey?
If so, then you want to use your own registry entry instead.

Something like this:
code:

!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
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump