United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6775670 Need to send unique ping and exit gracefully when user cancels install via FilesInUse
JDK-6775670 : Need to send unique ping and exit gracefully when user cancels install via FilesInUse

Details
Type:
Bug
Submit Date:
2008-11-24
Status:
Resolved
Updated Date:
2010-09-26
Project Name:
JDK
Resolved Date:
2009-03-30
Component:
install
OS:
generic,windows_xp,windows
Sub-Component:
install
CPU:
x86,generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u5,6u10,6u14
Fixed Versions:
6u14 (b04)

Related Reports
Backport:
Duplicate:
Duplicate:
Duplicate:

Sub Tasks

Description
In 6u10, we now download the MSI before showing the license agreement.  The user can click on cancel during the download.  We ping 1602 if they click on cancel.  

Basically, we need to make that we have a ping for these 2 scenarios:

1. User cancels download dialog
2. User clicks on disagree in the license dialog.

                                    

Comments
EVALUATION

I ran the 6u11 online installer, and clicked cancel on the download dialog....no pings were sent.
                                     
2008-12-11
EVALUATION

I ran the installer and cancelled the license agreement dialog.  It didn't log anything to %TEMP%/jusched.log, but I'm sure it does ping something (we have omniture pings for cancel).  Part of this fix should make sure we log the pings in *all* cases.
                                     
2008-12-11
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.
                                     
2009-02-19
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
                                     
2009-03-04



Hardware and Software, Engineered to Work Together