![]() |
#1 |
Junior Member
Join Date: Dec 2014
Posts: 5
|
Directory browser window
Hello any and everyone.
Just recently I got into learning how to make installers with NSIS and I normally found answers to all my questions fairly quickly except for this one. I am making an installer for a little project and the guy in charge asked if there wasn't a way to make the install directory browser window into the more simplified windows explorer window. The current window is as such: ![]() And I want to ask if there is a way to make it appear as this instead: ![]() The install only needs to choose the main folder and doesn't have to select a specific file. Any help would be truly grateful in this matter and thanks in advance. |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
The directory page uses the SHBrowseForFolder() Windows API function to choose a folder.
On Vista+ it is possible to use the newer IFileDialog with FOS_PICKFOLDERS but you would have to change the NSIS source and recompile or possibly use the button event plugin to do this. If you want to try the button event plugin then you would have to write the IFileDialog COM code with the system plugin. Seems like a lot of unnecessary work if you ask me... IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Dec 2014
Posts: 5
|
So thanks a lot to Anders, I was somehow able to get the browse button to bring up the new browse window, but now when I choose a folder and accept it, it doesn't change the install directory path and I have no clue where I can get what was chosen from the browse window code to make it the new install directory. If you could kindly show me where I can find it that would help. Attached is the script of the installer.
Thanks in advance |
![]() |
![]() |
![]() |
#4 | |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
Try this:
Quote:
IntOp $PostCount $PostCount + 1 |
|
![]() |
![]() |
![]() |
#5 |
Junior Member
Join Date: Dec 2014
Posts: 5
|
I would have never gotten to that in a million years. It works perfectly, thanks a lot for all your help Anders.
|
![]() |
![]() |
![]() |
|
Tags |
browse, directory |
Thread Tools | Search this Thread |
Display Modes | |
|
|