Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

As many are painfully aware of, Oracle continues to not only bundle the Java installation with the useless Internet browser toolbar from Ask.com, but also enable its installation by default. In addition to the toolbar, Ask also replaces your favourite search engine in your browser with Ask.

Furthermore, the Java installation goes as far as to actually recommend installing this useless junk, meaning that any non IT-savvy person is more than likely to leave it checked and install it (after all, it was enabled by default and the friendly Java installer did recommend it, right?).

To add insult to injury, even if you remove the Ask Toolbar, you can be sure to see it again soon, when the next Java update hits you (which seem to happen quite often lately, due to loads of security fixes for Java, but that's another story).

I'll duly remove the check-mark to install Ask Toolbar, whenever I update Java, but when supporting my family and friends, it's obvious they don't.

How can I prevent the pesky Ask.com Toolbar from being installed in the first place?

share|improve this question
6  
I always download the offline version of java which seems to be without the "ads". –  kobaltz Feb 10 '13 at 5:01
22  
Consider signing this petition change.org/petitions/… :) –  Mxx Feb 11 '13 at 3:20
2  
@RasmusRask - Ask.com is not included in the offline installer. –  Ramhound Feb 11 '13 at 12:46
2  
@RasmusRask offline version doesn't install Ask.com when updating. –  gronostaj Feb 11 '13 at 19:23
4  
Mandatory reading: A Close Look At How Oracle Installs Deceptive Software With Java Updates -- zdnet.com/… –  Walt Stoneburner Feb 12 '13 at 20:25

7 Answers 7

up vote 209 down vote accepted
+150

Digging a bit into the problem myself, I've found that there's an hidden switch to disable sponsor offerings in the auto-update installer.

Open the following keys into the Windows Registry Editor (regedit.exe):

  • HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft
  • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft (available only on Windows 64-bit)

and create in both of them a new String Value (type REG_SZ) named SPONSORS of value DISABLE (both name and value must be uppercase).

Alternatively, copy and paste the following code into a text file called disable_java_sponsors.reg and double click on it to import these values in your Registry.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft]
"SPONSORS"="DISABLE"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft]
"SPONSORS"="DISABLE"

Please note that this switch not only disables the Ask.com toolbar installation and prompt, but disables all of the sponsors potentially bundled with the Auto-update setup/Online setup (Google toolbar, Yahoo toolbar, McAfee something, etc...)


Another way, without having to download and rename or create a new .REG file, is to copy and paste the following two lines into an elevated CMD prompt:

reg add HKLM\software\javasoft /v "SPONSORS" /t REG_SZ /d "DISABLE" /f 
reg add HKLM\SOFTWARE\Wow6432Node\JavaSoft /v "SPONSORS" /t REG_SZ /d "DISABLE" /f
share|improve this answer
10  
That's a really neat and elegant solution. Nice find! Let's hope Java keep obeying that registry setting and don't suddenly decide to use another value - you know, just to push sponsor software through anyway ;-) –  abstrask Mar 9 '13 at 17:00
2  
I just tested the registry settings in a virtual machine with the Java RE 7 update 17. The Ask toolbar did indeed not install. Sweet! I like this fix a lot more than my own, so I'll change the accepted answer to this. Thanks! :-) –  abstrask Mar 9 '13 at 17:10
6  
I just wanted to confirm the SPONSORS=DISABLE option works for me too. It is now part of our Workstation GPO. –  msemack Apr 16 '13 at 22:18
2  
Downloadable file for your convenience: pastebin.com/download.php?i=iTkxyPum –  dtech Apr 30 '13 at 10:53
2  
Thank you, THANK YOU, THANK YOU –  Yaba Jun 27 '13 at 9:09

Edit 2014-02-02: With JavaRE 7u51, Ask toolbar now installs into a subfolder named "AskPartnerNetwork" instead of "Ask.com". One could have suspicions about what the point of that is... Meanwhile, @Danilo Roascio's registry values are still obeyed and works just as well as before.

This just highlights that the simple registry fix, is still the simplest and best solution. In case the Java installer changes, so that this registry value is ignored, the following script can still be used as a workaround - just make sure the Ask Toolbar path is updated.


The simplest way to prevent Ask Toolbar from being installed again I could think of, was to create the folder Ask Toolbar installs into and modify the permissions, so no one can write to it.

First, make sure that the Ask Toolbar has been removed. Then copy the following code to Notepad, save it as a .cmd file and run it in an elevated command prompt:

REM Detect processor architecture
set proc_arch=x64
if "%PROCESSOR_ARCHITECTURE%" == "x86" ( 
    if not defined PROCESSOR_ARCHITEW6432 set proc_arch=x86
) 

REM Define Ask Toolbar path
if "%proc_arch%" == "x86" set AskPath=%ProgramFiles%\Ask.com
if "%proc_arch%" == "x64" set AskPath=%ProgramFiles(x86)%\Ask.com
set AskReadme=%AskPath%\..\Ask.com_ReadMe.txt
set AskRevert=%AskPath%\..\Ask.com_RestorePermissions.cmd

REM Create dummy Ask Toolbar folder
md "%AskPath%"

REM Add explanatory text file, as to why the dummy folder is there
echo The 'Ask.com' folder is has been created and write protected,> "%AskReadme%"
echo in order to prevent Ask.com Toolbar from being 'accidentally'>> "%AskReadme%"
echo installed, e.g. by Java.>> "%AskPath%\readme.txt">> "%AskReadme%"
echo.>> "%AskReadme%"
echo This has been done using ICACLS by denying write access to the>> "%AskReadme%"
echo EVERYONE security group.>> "%AskReadme%"
echo.>> "%AskReadme%"
echo To revert permissions run:>> "%AskReadme%"
echo %AskRevert%>> "%AskReadme%"

REM Create script to remove restrictions
echo icacls "%AskPath%" /remove:d *S-1-1-0> "%AskRevert%"

REM Deny everyone (SID: S-1-1-0) write access
icacls "%AskPath%" /deny *S-1-1-0:(OI)(CI)W

Please note: ICACLS is included in Windows Vista and later. You can download ICACLS for Windows XP/Server 2003 through Microsoft KB919240, or an updated version through KB943043 (but the latter must first be requested, after which you will receive a link by e-mail to download it). For this purpose, both versions should work equally well.

I have verified with the installer for Java 1.7 update 13, that the Ask Toolbar indeed does not install, even if I leave the checkbox checked.

A similar approach can most likely be used to block most other kinds of piggybacking crapware.

Edit #1

Windows Explorer quirk: Access denied

Windows Explorer behaves a little strange if you try to open the folder. Even though you still have read access to the folder, Windows Explorer will tell you that access is denied, even though only write access has been denied.

This doesn't happen if you simply only have been assigned read access in the first place, but it seems to happen when you have been assigned read/write permission to the folder and then been denied write access.

Reverting permissions

The script has been updated to add a 'read me' text file and a script for removing the restriction again. Both are stored in the 32-bit program files folder.

share|improve this answer
10  
I would recommend leaving a text file inside the folder explaining why the "ask.com" folder is there and what it is designed to do. That way when you look back at the folder 3 years from now, you'll know what the reason for it was. –  Richard Feb 11 '13 at 17:14
    
@Richard: Probably a good idea ;-) –  abstrask Feb 11 '13 at 18:25
    
@Richard: Aagain, very good idea. I've updated the script to add the explanatory read me file. Due to the Windows Explorer quirk however, it's stored directly in Program Files, not in the Ask.com folder. The script now also saves a small script to revert the change, so you don't have to remember exactly what was done, or the syntax of ICACLS. –  abstrask Feb 11 '13 at 19:12
    
Small update to script: ProgramFiles path is now locale independent. –  abstrask Feb 16 '13 at 16:26

The javaruntime package on Chocolatey appears to avoid installing the Ask toolbar. I've been running that package and, unfortunately, the auto updater, and have not seen the Ask toolbar installed after an update from this initial source. I suspect the java updater adheres to the original installation parameters.

FYI, Chocolatey is a command-line Windows application/package manager, like apt-get for Linux.

share|improve this answer

For those of you interested- I created administrative templates (one for x86 and one for x64) that can be used for Group Policy. They've been tested and work in XP and Windows 7.

For more information on this procedure, click here.

In Group Policy you may need to go to View menu, click Filtering and uncheck "Only show policy settings that can be fully managed."

Save the following file as templatenamex86.adm and import in Group Policy:

CLASS MACHINE

CATEGORY !!cat01

KEYNAME "Software\JavaSoft"
POLICY !!polname

  SUPPORTED !!supOSes
  EXPLAIN !!poldescr

    PART !!msg01 EDITTEXT REQUIRED DEFAULT "DISABLE"
    VALUENAME "SPONSORS"
    END PART 

END POLICY


END CATEGORY

[strings]
cat01="Java Update Sponsor Offers x86 Windows"
polname="Set Value"
supOSes="Windows 2000+"
poldescr="Enabling this policy and leaving this field reading "DISABLE" will remove sponsor offers during Java updates"
msg01="DISABLED = Sponsor Offers Disabled"

Save the following file as templatenamex64.adm and import in Group Policy:

CLASS MACHINE

CATEGORY !!cat01

KEYNAME "SOFTWARE\Wow6432Node\JavaSoft"
POLICY !!polname

  SUPPORTED !!supOSes
  EXPLAIN !!poldescr

    PART !!msg01 EDITTEXT REQUIRED DEFAULT "DISABLE"
    VALUENAME "SPONSORS"
    END PART 

END POLICY


END CATEGORY

[strings]
cat01="Java Update Sponsor Offers x64 Windows"
polname="Set Value"
supOSes="Windows 2000+"
poldescr="Enabling this policy and leaving this field reading "DISABLE" will remove sponsor offers during Java updates in 64-bit Windows"
msg01="DISABLED = Sponsor Offers Disabled"

You should see them in Group Policy now: Group Policy

I hope this information can help others keep this garbage off their networks too!

-Mike

share|improve this answer
    
Nice for enterprise deployment, though I personally prefer deploying registry settings using Group Policy Preferences, instead of fiddling with getting the syntax in custom ADM templates juuust right ;-) –  abstrask Aug 17 '13 at 7:25

This was mentioned in the comments, but not clearly explained in any of the answers:

The offline Windows installer for Java doesn't prompt to install the Ask Toolbar. The link to the installer for the Java SE JRE (if you don't know what SE or JRE means, then this is what you want) is currently at:

http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html

The Windows offline installer for x86 (i.e. 32-bit software, includes most browsers) is clearly marked. The 64-bit installer seems to be offline-only.

share|improve this answer
    
This is great, but you will still have to uncheck it with each update. –  Jirka-x1 Nov 20 '13 at 10:15

Consider using https://ninite.com/ Select all the apps you want it to install/update, and with a single click it'll install only those apps, w/o extra garbage like Ask toolbar in java. If a system already has the latest version of a given app, Ninite will skip that install. Also you don't need to regenerate its package every time. The same .exe will ensure that you always install the latest versions. Just tell your friends/family to run it once a month and it'll make sure they are always up to date.

Update: Alternatively, if you install JRE from http://www.oracle.com/technetwork/java/javase/downloads/index.html it does not come with Ask or McAfee toolbars. (Not sure about auto-update afterwards).

share|improve this answer
1  
I like Ninite, but it has (at least) two drawbacks: a) Ninite doesn't allow you to differentiate between 32 and 64 bit Java (at least not that I know of) - on 64 bit machines, you will get both 32 and 64 bit Java installed, though the majority only needs 32 bit. B) Silent installs/updates is a premium feature, whereas Java has auto-update built-in (however ugly it might be) –  abstrask Feb 10 '13 at 22:08
    
Does it really matter if 64bit jre is also installed? It's not slowing the system down, and once browsers upgrade to 64bit, they'll have proper plugins ready. Simply tell your friends/family whenever they see java update popup to run Ninite installer. You don't need paid Ninite updater app. Or even put Ninite into Windows scheduler to automatically run however often you want and keep those systems up to date. –  Mxx Feb 11 '13 at 3:24
    
"Does it really matter if 64bit jre is also installed?" - Yes, when it's not needed at all, I think it matters. But then again, I'm a bit pedantic when it comes to unnecessary software ;-). Also, I have previously experienced with a Ninite-installed Java, that the 64-bit version never updated. Of course this could be solved my simply instructing my "users" to run the Ninite package periodically. But then again, the scope was to simply to prevent Ask.com Toolbar from being installed, through Java or otherwise. Tools like Secunia PSI and CSIS Heimdal can keep most 3rd party apps up-to-date. –  abstrask Feb 11 '13 at 14:47
    
The Java Auto Updater appears to only update the 32-bit version. If you also have 64-bit installed, it will be left behind. –  Martijn Heemels Jul 17 at 8:01

Another method is to prevent DNS resolution of the ask.com domain. I tested this by setting my network's DNS cache/resolver (Unbound) to refuse queries for ask.com and then updating java with the ask toolbar box checked. Result was no installation.

This method has the drawback (if you consider it such) that the ask.com domain will be unavailable. But it has the bonus that ask.com "infected" systems may be discovered (as users may have search issues) allowing for disinfection to be undertaken.

Another positive is that no changes are needed for each computer. The DNS solution works for all systems immediately and simultaneously. Note that other DNS caches must be blocked - which is quite typical in most controlled environments - the firewall prevents access via port 53 to outside DNS from all but the internal DNS cache/resolver.

share|improve this answer
6  
"This method has the drawback (if you consider it such) that the ask.com domain will be unavailable" - I don't consider that a drawback ;-). For the computers I normally support, I cannot configure this at the router level, so it would be a per-computer job regardless. –  abstrask Feb 10 '13 at 20:56
2  
Along the lines of your answer, darkphader, a host file entry of 127.0.0.1 www.ask.com could work for an individuals computer. –  Bryan Feb 27 '13 at 21:29

protected by slhck May 15 '13 at 15:41

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.