Archive: 2 dir paths, different defaults, auto-add for 1, Possible?


2 dir paths, different defaults, auto-add for 1, Possible?
I am trying to get 2 different directory screens working in an installer.

One has the path for the program files, and adds the Default Program Directory to the end if the user browses to a new path

The second has the path for the data files, and does *not* want to append anything to the end of the path if the uses browses somewhere other than the initial default

I've attached a cut down version of the code I am using which will add "myTest2PathDir" to the end of any browsed to path on both directory windows.

I am aware that if I add a backslash at the end of the path for the install directory (thus)...


InstallDir "$PROGRAMFILES\myTest2PathDir\"


...I can avoid the adding to the end of a browse path, but ideally I want it for the one (program), not the other (data)

There is a page at wiki that might help you,

http://nsis.sourceforge.net/Setting_...Directory_Page


Thank you for the response

Yes I looked at that page before. It doesn't actually compile, and if I fix the code by commenting out 2 lines, it is looking for a icon file that doesn't exist [line 26] and calling !insertmacro MUI_RESERVEFILE_WELCOMEFINISHPAGE [line 59] which cannot be found) it doesn't seem to work correctly

Perhaps it is the MUI_RESERVEFILE_WELCOMEFINISHPAGE I removed? I was unsure what that is supposed to do

At any rate the two data directory screens both share the same path, changing one changes the other, and neither append anything when browsing which is what I wanted to do with the install path

From a little debugging, it seems the PRE event is never being called

I had also investigated the forum link on that page, but it seems as if it is referencing older MUI builds? For example it uses !insertmacro MUI_PAGECOMMAND_DIRECTORY which won't compile, where as !insertmacro MUI_PAGE_DIRECTORY not only compiles but works well


I had a look, I am using "NSIS Modern User Interface version 1.75 - © 2002-2006 Joost Verburg" for the MUI Modern interfance


Re: 2 dir paths, different defaults, auto-add for 1, Possible?

Originally posted by fashtas
...I can avoid the adding to the end of a browse path, but ideally I want it for the one (program), not the other (data)
I guess you should set up a custom page for the second (data) dir.