United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7158412 JRE installer does not delete its installation files from the user's Application Data folder
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:
Open
Updated Date:
2013-04-20
Project Name:
JDK
Resolved Date:
Component:
install
OS:
windows
Sub-Component:
install
CPU:
generic
Priority:
P3
Resolution:
Unresolved
Affected Versions:
6u31
Targeted Versions:
8

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
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