Today I had to re-sync my OneDrive library on my Windows 8.1 laptop but before I could log in I got stuck on a “Javascript is required” error message.

I checked, double-check and re-checked that all Javascript options were enabled in Internet Explorer 11. I completely reset the browser, wiping all my settings, I re-installed IE11, I re-registered jscript.dll and vbscript.dll using regsvr32, I even re-registered almost any dll which resides in system32… Still nothing worked.
At this point I actually tried using Internet Explorer (god forbid me) and I soon realised that not only Javascript was completely broken but also the F12 Developer Tools of IE11 itself did not work any. All I got was a white, blank window with a ‘>’ and a button or two.

After Google’ing some more I came across a post of someone who suffered the same issues and he had just uninstalled McAfee SiteAdvisor. I realized that I had just uninstalled (somewhat improperly) McAfee anti-virus and McAfee Firewall and that this must be the cause.
The fix
The problem seems to be caused by some ScriptSn* libraries. To fix this, you have to unregister these libraries by running the following commands in an elevated prompt (Run as Administrator)
regsvr32 /u "C:\Program Files\Common Files\McAfee\SystemCore\ScriptSn.20161019232944.dll" regsvr32 /u "C:\Program Files\Common Files\McAfee\SystemCore\ScriptSn.20161020011020.dll" regsvr32 /u "C:\Program Files\Common Files\McAfee\SystemCore\ScriptSn.20161020011140.dll"
If you get an error message “The module x failed to load”, please check the filenames, I have the feeling they might be different from system to system. Reboot the system and Javascript should be back :) . Similar scripts also reside in the Program Files (x86) folder but unregistering throws an access denied error.
Bonus
If you’re uninstallation of McAfee went wrong then this script might help you. There are four locations with DLL’s to unregister
- C:\Program Files\McAfee
- C:\Program Files\Common Files\McAfee
- C:\Program Files (x86)\McAfee
- C:\Program Files (x86)\Common Files\McAfee
Run the following batch script as an elevated user for each of the abovementioned folder. Be sure that the exact folder exists, if not it will unregister all DLLs in the current folder (usually c:\windows\system32)
<pre><code>@echo off pushd "PASTE FOLDER PATH HERE AND DELETE THE EXIT ON THE NEXT LINE" exit for /r %%a in (*.dll) do ( regsvr32 /u /s %aa Echo Unregistering %%a . . . ) popd Echo. Pause | Echo Unregistration Complete: Program will now Exit </code></pre>
