Archive: How to select the installation directory?


How to select the installation directory?
Hi,
I'm using NSIS Version 2.44 for compilation. In the script I have added the line 'Page Directory'. So I'm expecting the installer to ask the user for installation directory selection. But this is not happening for me. It is not asking for the directory selection. Only option I have is to go with 'Install' button.

I have mentioned default output directory as C: . So it is installing in C: drive without asking.

I have tried with sample code with same 'Page Directory'. But in this case it is promptly asking the user for installation path.

What could be the problem?.


Regards,
VHLK


without seeing your code, I'm not sure what might be the cause.

Does this code work?


!include "winmessages.nsh"
!include "LogicLib.nsh"
!include "nsDialogs.nsh"

Outfile "test.exe"
ShowInstDetails show

var dialog
var hwnd
var null

Page custom customPageA
Page directory
Page custom customPageB
Page Instfiles

Function customPageA
StrCpy $INSTDIR "c:\"
nsDialogs::Create 1018
Pop $dialog

${NSD_CreateLabel} 37% 8% 61% 30% "Installdir: $INSTDIR"
Pop $null

nsDialogs::Show
FunctionEnd

Function customPageB
nsDialogs::Create 1018
Pop $dialog

${NSD_CreateLabel} 37% 8% 61% 30% "Installdir: $INSTDIR"
Pop $null

nsDialogs::Show
FunctionEnd

Section ""
DetailPrint "Installing to: $INSTDIR"
SectionEnd

You may find you'll have more luck with an NSIS script installer wizard where your installer script is generated for you. I found HM NIS Edit to have a great wizard and when I was a beginner it helped me to create my first installers.

http://hmne.sf.net

~SAM~