How to call "Browse for folder" from MSIcode

Got a problem you cannot solve? Try here.
markoh3
Posts: 11
Joined: Mon Mar 03, 2014 2:52 am

How to call "Browse for folder" from MSIcode

Postby markoh3 » Mon Mar 03, 2014 3:15 am

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.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

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

Postby FrancescoT » Mon Mar 03, 2014 1:25 pm

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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

markoh3
Posts: 11
Joined: Mon Mar 03, 2014 2:52 am

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

Postby markoh3 » Fri Mar 14, 2014 2:09 am

Hi Francesco,

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

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

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

Postby FrancescoT » Fri Mar 14, 2014 9:08 am

:D
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 109 guests