Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Display dialog and loop on CA

0 views
Skip to first unread message

Michael Tissington

unread,
Jun 24, 2004, 5:55:27 PM6/24/04
to
I have a CA that returns OK or FAIL

How can I do the following when an install is launched

WHILE CA() = FAIL
Display dialog (user can press OK or Cancel)
IF Cancel THEN quit install
LOOP

--
Michael Tissington
http://www.oaklodge.com
http://www.tabtag.com

Michael Sanford [MVP]

unread,
Jun 24, 2004, 7:42:06 PM6/24/04
to
Hi Michael,

You can't loop custom actions. You'd have to incorporate that loop into the
custom action somehow. What is it you are really trying to do? More info
might help us to provide a solution.

--
****************************************
Michael Sanford
Windows Installer MVP
****************************************
"Michael Tissington" <mic...@nospam.com> wrote in message
news:uP0j2XjW...@TK2MSFTNGP11.phx.gbl...

Michael Tissington

unread,
Jun 24, 2004, 7:56:06 PM6/24/04
to
I have a CA that returns S_OK or FAIL if an application is running.

If the application is running the install poops up a dialog asking them to
close, when they press 'OK' it runs the ca again, if the CA returns S_OK
then the install can continue, else the dialog remains.
If they press Exit, the install exits - I can do that bit ;)


"Michael Sanford [MVP]" <msan...@nospam.com> wrote in message
news:e30bbTkW...@TK2MSFTNGP09.phx.gbl...

Michael Sanford [MVP]

unread,
Jun 24, 2004, 8:24:18 PM6/24/04
to
So, can't you just put the loop in the custom action and pop the message
box(es) from there?

--
****************************************
Michael Sanford
Windows Installer MVP
****************************************
"Michael Tissington" <mic...@nospam.com> wrote in message

news:OkggRbkW...@TK2MSFTNGP09.phx.gbl...

Michael Tissington

unread,
Jun 24, 2004, 9:02:15 PM6/24/04
to
Yes, that's what I have done now but I was trying to keep all my
localizations in one place (ie the msi itself).

So how do I exit depending on the result from my CA ?


"Michael Sanford [MVP]" <msan...@nospam.com> wrote in message

news:eytFBrkW...@TK2MSFTNGP11.phx.gbl...

Felix Wang

unread,
Jun 24, 2004, 11:47:22 PM6/24/04
to
Hi Michael,

I suppose it is "immediate" custom action. Can we show the error dialog in
the custom action itself, instead of using a MSI dialog? Then we can keep
the loop in the custom action.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Douglas Hogan

unread,
Jun 25, 2004, 5:16:24 AM6/25/04
to
You can put a string into a UIText row, get this at runtime from the CA code
using an SQL query and then display the dialog. Means all the localizable
strings are in the Msi database.

Douglas.

"Michael Tissington" <mic...@nospam.com> wrote in message

news:OXkAPAlW...@TK2MSFTNGP10.phx.gbl...

Michael Sanford [MVP]

unread,
Jun 25, 2004, 8:03:44 AM6/25/04
to
2 Ways:

1. Simply return anything other than ERROR_SUCCESS and the install will
fail.

2. Set a property indicating the status and return ERROR_SUCCESS. Back in
the msi, you can take some other action based on that property (like a type
19 custom action).

IMO, option 2 is probably a bit more user friendly.

--
****************************************
Michael Sanford
Windows Installer MVP
****************************************
"Michael Tissington" <mic...@nospam.com> wrote in message

news:OXkAPAlW...@TK2MSFTNGP10.phx.gbl...

0 new messages