EVALUATION
As download dialog happens before the license agreement, and part of the license agreement is the user agreeing that it's ok to send pings, for 6u14 we'd like to only send a unique ping code for a FileInUse cancel.
Changing abstract to reflect what will actually be fixed with this CR:
1. Detect a FilesInUse cancel and exit gracefully.
2. Send a unique ping (NOT 1603) for the above.
Targeting for 6u14 b04
|
EVALUATION
The code is currently designed to NOT send a ping when the license agreement is declined. The progression is as follows:
In the MSI control event table:
LicenseAgreement.LicenseCancel.Click() results in LicenseDeclineCancel.
LicenseDeclineCancel.Yes.Click() results in execution of CA SetLicenseDecline.
SetLicenseDecline calls RegUtilsMSI::SetLicenseDecline().
In RegUtilsMSI::SetLicenseDecline():
The regkey, "HKLM\Software\JavaSoft\InstallStatus" is appended with, "decline."
The above registry key is used to build the XML that is sent to omniture via SSL (HTTPS) in the function RegUtils::SendHeadRequest(). In that function:
if (lstrcmp(state,STATE_INSTALL_COMPLETE)== 0) {
// {...}
// szURL is a TCHAR value of HKLM\Software\JavaSoft\InstallStatus
if ((error != ERROR_SUCCESS) || (lstrcmp(szURL, "decline") == 0))
{
//Delete Visid after the installation is complete
SetJavaUpdateStringKey(NULL, REG_JUPDATE_VISID, NULL);
SetJavaUpdateStringKey(NULL, REG_JUPDATE_METHOD, NULL);
}
//Don't post if License declined
if (lstrcmp(szURL, "decline") == 0) return TRUE;
wsprintf(szICStatus, ";jre|%d", error);
// {...}
}
As the ping will be sent by the wrapper (same for both online and offline) during an INSTALL_COMPLETE state, if the user has declined the License Agreement, the ping will never be sent (the function returns before any of the WININET API calls that follow).
In order to process a declined license agreement, the above code will need to be removed and the DWORD value of "error", which is passed into SendHeadRequest(), would need to be changed to something distinct from the return code from the MSI (1602).
Likewise, code will need to be added to RegUtilsMSI to write a keyword for a FilesInUse.Cancel.Click() event, as well as the supporting CAs in the MSI, etc. The added block in SendHeadRequest() will be as follows:
if ((error != ERROR_SUCCESS)
|| (lstrcmp(szURL, "decline") == 0)
|| (lstrcmp(szURL, "fiucancel") == 0)){
//Delete Visid after the installation is complete
SetJavaUpdateStringKey(NULL, REG_JUPDATE_VISID, NULL);
SetJavaUpdateStringKey(NULL, REG_JUPDATE_METHOD, NULL);
}
//Post discreet error if License declined or FIU cancel
if (lstrcmp(szURL, "decline") == 0){
error = 1698;
} else if (lstrcmp(szURL, "fiucancel") == 0){
error = 1699;
}
//Update ICStatus with error code
wsprintf(szICStatus, ";jre|%d", error);
The above change targeted for 6u14 b03.
|