2009
03.25

This happens in both Internet Explorer 6 and 7 when a user is printing from a web page that has a Java applet embedded.

The first thing we tried was clearing all temporary files and cleaning the registry. This made no difference, so we then tried uninstalling Sun Java and reinstalling it, but the problem persisted. Next, in case it was and issue just for this user, we had them log out while we renamed the profile so when they logged back in they had a new one created. Same problem. Finally, we found this batch file to completely remove Sun Java from the computer here. We ran that, and then reinstall Java and it was fixed. You can download the batch file here (Right-click -> save file/link). Here’s the actual code in the batch file:


Rem to run this file and log the output use: "uninstall java.bat">>java_remove.log
Rem @echo off &
cls
Rem List all Installation subkeys from uninstall key.
echo Searching Registry for Java Installs
for /f %%I in (’reg query HKLM\SOFTWARE\microsoft\windows\currentversion\uninstall’) do echo %%I | find “{” > nul && call :All-Installations %%I
echo Search Complete..
goto :NoneFound
:All-Installations
Rem Filter out all but the Sun Installations
for /f “tokens=2*” %%T in (’reg query %1 /v Publisher 2^> nul’) do echo %%U | find “Sun” > nul && call :Sun-Installations %1
goto :EOF
:Sun-Installations
Rem Filter out all but the Sun-Java Installations. Note the tilda + n, which drops all the subkeys from the path
echo %1
for /f “tokens=2*” %%T in (’reg query %1 /v DisplayName 2^> nul’) do echo . Uninstalling - %%U: | find “Java” && call :Sun-Java-Installs %~n1
if errorlevel 1 (
echo Doing further conditional checking on variables.
for /f “tokens=2*” %%T in (’reg query %1 /v DisplayName 2^> nul’) do echo . Uninstalling - %%U: | find “J2SE” && call :Sun-Java-Installs %~n1
)
goto :EOF
:Sun-Java-Installs
Rem Run Uninstaller for the installation
MsiExec.exe /x%1 /qb /quiet /passive /promptrestart
echo . Uninstall Complete, Resuming Search..
goto :EOF
:NoneFound
Rem No Java found to remove from this system
echo No Java found or all versions already removed from this system
goto :EOF

No Comment.

Add Your Comment