Skip to content
⌘ NSIS Forum Archive

Problem with directoryShow function: a bug?

9 posts

hooklee#

Problem with directoryShow function: a bug?

With the following codes, $INSTDIR is empty in directoryShow function, while it is "C:\Test" in directoryPre function. Is it a bug?

Name "Test"

OutFile "Test.exe"

InstallDir "C:\Test"

PageEx directory
PageCallbacks directoryPre directoryShow
PageExEnd
Page components
Page instfiles

Function directoryPre
MessageBox MB_OK "directoryPre: $INSTDIR"
FunctionEnd
Function directoryShow
MessageBox MB_OK "directoryShow: $INSTDIR"
FunctionEnd

Section
SectionEnd
hooklee#edited
I have tested it under WinXP Pro, Win2000 and Win98SE Oses. The problem happens under WinXP Pro and Win2000.
kichik#
Messing with $INSTDIR is not exactly the intention of the show function, but this is still a valid problem. Open a bug report on the SourceForge project page for it, I don't have time to fix it now.
hooklee#
I have submitted a bug report: ID 1209843.

Kichik, this function may be useful when the user want to disable/hide some controls by checking $INSTDIR. In my installer, I have two directory pages, one of which is a folder for copying some files if they do not exist there.
kichik#
I've finally taken the time to look into it and found the problem. The bug was fixed and the fix will be present in version 2.13 which should be released next weekend.