United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7158412 : JRE installer does not delete its installation files from the user's Application Data folder

Details
Type:
Bug
Submit Date:
2012-04-02
Status:
In Progress
Updated Date:
2013-10-18
Project Name:
JDK
Resolved Date:
Component:
install
OS:
windows
Sub-Component:
install
CPU:
generic
Priority:
P3
Resolution:
Unresolved
Affected Versions:
6u31
Targeted Versions:
8-pool

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
Install the 1.6.0_31 JRE by executing jrefb-6u31-windows-i586.exe. The extracted installation files [Data1.cap (12845 KB), jre1.6.0_31.msi (886 KB) and jre1031.MST (62 KB)] are not being deleted from the user's Application Data folder (on Windows Vista/7 the location of the Application Data folder is C:\Users\<user>\AppData\LocalLow\Sun\Java). 

It seems those files are not necessary anymore after the installation.

This has also the effect that for non existing user directories (e.g. system account) these files will land in the default user. A user that logged on to the terminal server where this installation ran, gets all contents of the default user into his own profile, which can cause a data overflow. Note: with direct use of msi files, this behavior does not occurr, but installation using msi is not supported.

We suggest to turn this behavior off, either by default or at least by an install option.

                                    

Comments
Release team: Approved for deferral to 8-pool.
                                     
2013-10-18
8-defer-justification:
The fix proposed introduces loss of other functionality, which may not be acceptable for the release.
Given this is not a regression, and there exists a workaround, requesting deferral to 8-pool in lieu of the proposed fix.
                                     
2013-10-14
SQE-approves defer from 8
                                     
2013-10-14
Here is the link for the code review. 
http://sqe-rb.us.oracle.com/r/18145/

Since the jdk msi cache is needed for the jdk modify feature, it needs the management decision on if the jdk modify feature can be removed.  It is suggested for the defer for 8-pool.
                                     
2013-10-10
On both 64bit windows vista and windows 7
Tested with the jdk8 b109 promoted build,
1. jre offline installer: The files are not removed.
2. jre online installer: The files are removed. leave empty directory there.
                                     
2013-09-30
Fix will be to move the RemoveMSICache() to the WrapperUtils.cpp from the RegInstall.cpp.  Call the function at the end of the jre/jdk installation from the wrapper so that the msi files will be removed after the installation, not from the uninstall which is the current behavior.
                                     
2013-09-30
Placeholder for Gajin.
                                     
2013-06-07
EVALUATION

discussed with Bill

install\make\installerdll\installerdll\src\installer\RegInstall.cpp: Remove*MSICache() functionality should be moved to the wrappers that put the files under AppData
Instead of the MSI cleaning up during uninstall, the wrapper cleans up during install

- installer.def:
-        MSIRemoveJREMSICache
-	 MSIRemoveJDKMSICache
RegInstall.cpp:
-BOOL RemoveMSICache(const enum InstallTypes installType)
-UINT MSIRemoveJREMSICache(MSIHANDLE hInstall)
-UINT MSIRemoveJDKMSICache(MSIHANDLE hInstall)
RegInstall.h:
-BOOL RemoveMSICache(const enum InstallTypes installType)
-UINT MSIRemoveJREMSICache(MSIHANDLE hInstall)
-UINT MSIRemoveJDKMSICache(MSIHANDLE hInstall)

ControlEvent.idt, CustomAction.idt, InstallExecuteSequence.idt:
-RemoveJ*MSICache
-MSIRemoveJ*MSICache

Test cases need to include making sure the files are deleted when the user cancels the install at various dialogs.

Looking at the JRE online wrapper
http://opengrok.ie.oracle.com:8080/source/xref/jdk7u-dev/install/make/installer/bundles/windows/ishield/wrapper_online/jre/jinstall.cpp#1163
it looks there is already code to delete the files, if not the directories:
    // We want to keep the MSI and MST files when the user has cancelled FilesInUse
    // and opted for a retry. so only delete these files for installations that are
    // NOT setting up a RunOnce, aka install re-try.
    if (!bKeepAppDataFiles) {
        ::DeleteFile(szSinglemsiCachedFile);
        ::DeleteFile(szMSTCachedFile);
        ::DeleteFile(szSPDLLCachedFile);
    }

After making sure the directory is handled, the code needs to be copied to the JRE offline,
then expanded to handle the multiple .cab files for the JDK installer.
                                     
2012-06-13
WORK AROUND

remove the temp. installer files manually or by a post-install script from the user's application data folder.
                                     
2012-04-12
EVALUATION

These files are not needed after installation.  The installer wrappers should delete them at the end of the install.
                                     
2012-04-02



Hardware and Software, Engineered to Work Together