Archive: Directory Page Start Folder Branch


Directory Page Start Folder Branch
In the directory page, when choosing the installation folder by the 'Browse' button, the complete folders branch is shown (i.e. with Desktop and MyDocuments directories too); I would start the choice from the 'Program Files' folder, so to show the 'Program Files' directories branch: how to set it ?


You can do that with a custom page using InstallOptions. Use the Root key to set the root for a DirRequest item.


Can you write the page code example ?


It's just a DirRequest item with a Root key. You can add Root to Field 6 in Examples\InstallOptions\test.ini and compile Examples\InstallOptions\test.nsi for an example.


Ok


Hi, I am here again to say that after setting the root item direcrory, the browse button shows only that directory branch not giving the choise to select also other folders. Is there the possibility to show the entire folders tree then starting from the root specified ?


Use the "State" key and put the desired directory you want it to select.


When specifying in the 'state' key a folder as [drive]\[mainFolder]\[subFolder] with mainFolder existing and subFolder not, then the directory branch starts from 'MyDocuments' folder (not as I would); when subFolder is existing then the directory branch starts from [drive]\[mainFolder]\[subFolder] (as i would): how to start the directory branch from the folder [drive]\[mainFolder] when the subFolder is new (not existing) ?