Custom actions in dialogs ?

Got a problem you cannot solve? Try here.
Post Reply
dcreel
Posts: 2
Joined: Sun Feb 10, 2008 7:03 pm
Location: Sydney, Australia
Contact:

Custom actions in dialogs ?

Post by dcreel »

Hi,
We need a button press on a dialog to call a customised script. Basically we need to test a database connection via an external exe.

Is there some way to introduce custom event handlers/methods so that we can do this?

Wise for Windows installer does this, but I've not found a way to do this in InstallAware.

There are about 5 standard actions available for buttons in the dialog editor (eg. Next dialog, previous dialog, cancel, etc.), however there seems to be no way to introduce a custom handler.

Any help appreciated.
Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Post by Gizm0 »

There is a way to do this. Take a look at the AutoRun sample and you'll find out how to do it.
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
Install[b]Aware[/b] Software Corporation
jape
Posts: 6
Joined: Thu Feb 22, 2007 2:58 am

Post by jape »

I had a similar problem.
Soveld it by setting MYCUSTOM button action to Return from Dialog and then in MSIcode checked if wizard variable is MYCUSTOM. Execute program and goto back to dialog

Code: Select all

label: Welcome Dialog
Display Dialog: welcome, wait for dialog to return (modal)
if Variable WIZARD Equals CANCEL
  GoTo Label: Main Install
end
if Variable WIZARD Equals MYCUSTOM
  Run Program $SUPPORTDIR$\\MyCustomProgram.exe
  GoTo Label: Welcome Dialog
end
Only annoyance is that dialog flashes, but I think we can live with that.
Post Reply