Bugs item #1440141, was opened at 2006-02-28 16:42
Message generated for change (Settings changed) made by mosmond
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1440141&group_id=105970
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: CustomActions
Group: v2.0
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Osmond (mosmond)
>Assigned to: Scott Kurtzeborn (scotk)
Summary: ConfirmOverwrite in Create SQL Database not working
Initial Comment:
Using the SQL Database Element.
Appears to be a bug where if you set ConfirmOverwrite
to yes, and the installer prompts that a database
exists, continue yes/no; if I select no, the install
scripts are
executed anyway. I am not actually a developer, but
I took a look at
the CustomAction and I think there is a problem in
scaexec.cpp -
In the function CreateDatabase
if (iAttributes & SCADB_CONFIRM_OVERWRITE)
{
// Check if the database already
exists
hr = SqlDatabaseExists(pwzServer,
pwzInstance, pwzDatabase, fIntegratedAuth, pwzUser,
pwzPassword, &bstrErrorDescription);
MessageExitOnFailure2(hr,
msierrSQLFailedCreateDatabase, "failed to check if
database exists: '%S', error: %S", pwzDatabase, NULL
== bstrErrorDescription ? L"unknown error" :
bstrErrorDescription);
if (S_OK == hr) // found an existing
database, confirm that they don't want to stop before
it gets trampled
{
if (IDNO ==
WcaErrorMessage(msierrSQLDatabaseAlreadyExists, hr,
MB_YESNO, 1,
pwzDatabase))
ExitOnFailure
(hr, "failed to
initialize");
}
}
1. hr holds the result of SqlDatabaseExists - which
is true in the case of this problem.
2. The CA then prompts with a datbase already exists -
and if the answer is IDNO then it calls
ExitOnFailure.
3. But if I read ExitOnFailure(hr, ...) correct, it
only fails if hr is false, but this will still be
true as per 1.
4. Result is the CA continues to process the
CreateDatabase on a response of either yes or no.
Michael
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1440141&group_id=105970
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs