JDK-7158412 : JRE installer does not delete its installation files from the user's Application Data folder
  • Type: Bug
  • Component: install
  • Sub-Component: install
  • Affected Version: 6u31,7-pool,8-pool,9
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows
  • CPU: generic
  • Submitted: 2012-04-02
  • Updated: 2016-07-12
  • Resolved: 2016-07-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
6u33Fixed 9Resolved
Related Reports
Relates :  
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.

Moved main fix to 9. Unclear on customer demand.

Stephen, do we still have a specific customer request for this in 6/7, or can this be resolved in 9/8u-dev?

Release team: Approved for deferral to 8-pool.

SQE-approves defer from 8

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.

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.

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.

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.

Placeholder for Gajin.

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.

WORK AROUND remove the temp. installer files manually or by a post-install script from the user's application data folder.

EVALUATION These files are not needed after installation. The installer wrappers should delete them at the end of the install.