Displaying Network Browse Dialogs in InstallScript Installations

InstallShield 2022

You can use the SelectDirEx function to display a dialog with which the user can browse the Network Neighborhood.

prototype NetBrowse( );

 

function NetBrowse( )

    STRING svSelectedDir[MAX_PATH + 1];

    NUMBER nReturn;

begin

    svSelectedDir = PROGRAMFILES;

 

    nReturn = SelectDirEx("", "Select a directory:", "", "",

        BIF_EDITBOX | BIF_RETURNONLYFSDIRS, svSelectedDir);

 

    if (nReturn = OK) then

        MessageBox("Selected directory was: " + svSelectedDir, INFORMATION);

    elseif (nReturn = CANCEL) then

        MessageBox("User clicked Cancel", INFORMATION);

    else

        MessageBox("Error displaying dialog", WARNING);

    endif;

end;