Page 1 of 1

How to call "Browse for folder" from MSIcode

Posted: Mon Mar 03, 2014 3:15 am
by markoh3
Hi,

I am trying to call the "Browse for folder" window from the MSIcode because the button in the dialog needs to show a messagebox first before browsing to a folder. Is this possible from the MSIcode? And if this is possible how can I do this?
I have already the following code:

if Variable WIZARD Equals BROWSE
MessageBox: Installation location, PLEASE NOTICE: $NEWLINE$ The installation path... Do you wish to continue?
if Variable MYCONTINUE Equals YES
end
if Variable MYCONTINUE Equals NO
end
end

Here I need to open the window "browse for folder" when you click on yes in the messagebox and go back to the dialog when you click no in the messagebox.

My thanks in advance.

Re: How to call "Browse for folder" from MSIcode

Posted: Mon Mar 03, 2014 1:25 pm
by FrancescoT
Dear User,

Unfortunately, you can't control a Dialog event from the script.

Anyway, you could have the same result using a different approach.

Instead of using the "Browse for folder" method with your setup dialog, you could create a custom dll for this purpose.
This Dll should be called just after your Message-box confirmation in your script and then to use the path returned from Dll to initialize the TARGETDIR pre-defined variable. Finally, you should call your setup destination dialog once again to display the returned directory.

Alternatively, you could use the following third party plug-in to show a Browse for folder dialog ... instead of creating a custom dll.
http://www.installaware.com/forum/viewtopic.php?f=3&t=503

I never used this plugin ... but it should work fine.

Hope this helps you.

Regards

Re: How to call "Browse for folder" from MSIcode

Posted: Fri Mar 14, 2014 2:09 am
by markoh3
Hi Francesco,

Thank you for your reply. I used the Alternative third party plug-in and this works fine by me.

Re: How to call "Browse for folder" from MSIcode

Posted: Fri Mar 14, 2014 9:08 am
by FrancescoT
:D