Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Javascript & Active Content not working on the local machine  (Read 6387 times)

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33881
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Javascript & Active Content not working on the local machine
« on: February 09, 2009, 04:23:37 AM »

I'm writing this here for the sake of posterity as I've today managed to solve a problem that has been driving me nuts for ages.

Problem

Active content will not run on my local machine.
Javascript works from the internet but wont work if the script is stored locally. 

Symptoms

Javascript/any scripts wont work on the local machine (major headache for a coder)
Some Windows Help Files stop working or break if the links are javascript related.
Cant view certain Windows logs such as Computer Management > Services & Applications > Services > Advanced.

Tried all the usual stuff

The following should be tried first

  • Reset all the security zones to default
  • Say yes to the tool bar to allow active content
  • Made sure Internet Options > Advanced > Security > 'Allow Active content to run in files on My Computer' was checked.


After searching on the internet I found this type of problem can occur through MS Local Machine lockdown.  One of the best references I could find was here where I found that the following registry keys should be set

Warning the following involves registry changes - make sure you back up the registry and you do so at your own risk.
Quote
HKEY_CURRENT_USER\ Software\ Microsoft\ Internet Explorer\ Main\ FeatureControl\ FEATURE_LOCALMACHINE_LOCKDOWN\ iexplore.exe
DWORD 1= ON 0 = OFF

HKEY_CURRENT_USER\ Software\ Microsoft\ Internet Explorer\ Main\ FeatureControl\ FEATURE_LOCALMACHINE_LOCKDOWN\ Settings\ LOCALMACHINE_CD_UNLOCK
DWORD 0=ON 1= OFF

The above should the problem for most users, but it didnt for me.. and now I was on my own as I couldnt find any further real references as to where the problem could be.  :'(

I couldnt see anything obvious in the registry and even sent a copy of my NTuser.dat to a friend to see if he could see anything that differed on his machine. - Nada.

Hmmm something strange - Its not Local Machine.

I created a new user on the PC and noticed that once I'd set the user to allow active content on the local machine - all worked fine. 
So this is not a local machine problem as first thought - its obviously user specific.
So back to HKCurrentUser...  but where to start?

OK I found a few references to

HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Internet Settings\ Lockdown_Zones\0
and
HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Internet Settings\ Zones\0

but there wasnt any real info as to what I was looking for in there... so armed with screen cap and switching between users it was a case of looking at all the different Values.

OK so its a Local Machine problem so it has to be zone 0 because

Quote
Lockdown Zones
·         0:  Local Machine
·         1:  Local Intranet
·         2:  Trusted Sites
·         3:  Internet
·         4:  Restricted Sites

But Ive no idea what each value is and there were quite a lot of differences between the 2 users... but I now had some Keyids to start looking at.
Armed with this info I came across this excellent site Inside the registry.com.
Obviously lots to look at but working my way down the list for those that were different and after a couple of false starts,  I came across key 1400 and looked it up

Quote
Policy: Allow active scripting

Now we're getting somewhere - now I just need to fathom out what the values should be.

Quote
0 = enabled 1 = prompt 3 = disabled

hmmm yeah my DWORD was set at 3 - which totally blocks it - no warnings or anything.

So now we have

Quote
HKEY_CURRENT_USER\ Software\ Microsoft\ Windows\ CurrentVersion\ Internet Settings\ Lockdown_Zones\0

Key 1400
change DWORD to 0

Crossed my fingers.. made the change........ and it worked.

I can code and test my scripts again..  windows help files work as do log file advanced displays.

YAY.

Hopefully this info will help someone else solve something that has been wrong for a few months now.. Im not sure when it occurred.. possibly after I let Ashampoo run loose on my PC and it accidentally deleted a pile of my own scripts/progs files I wasnt too chuffed about.

Granted neither of these 2 incidents wouldnt really have affected anyone who is not a coder, but warning to those that are... and I hope this info can help someone else with a similar problem.

Result
- one happy kitz that can now code and test files locally without having to upload them.  ;D
« Last Edit: February 09, 2009, 12:38:16 PM by kitz »
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

mr_chris

  • Kitizen
  • ****
  • Posts: 3774
Re: Javascript & Active Content not working on the local machine
« Reply #1 on: February 09, 2009, 07:58:09 AM »

Wow, glad you got it sorted :) I wonder what on earth had changed that value then?!

A good bit of detective work Sherlock Kitz!
Logged
Chris

oldfogy

  • Helpful
  • Kitizen
  • *
  • Posts: 3568
  • If it ain't broke....... I'll soon fix it.
Re: Javascript & Active Content not working on the local machine
« Reply #2 on: February 09, 2009, 01:20:16 PM »

I don't know if this has anything to do with the root of the problem, but quite frequently when starting the internet I see a message from "Avast" saying something about checking "Scripts"

So I wonder if changing from one AV product to another (Avast) has left some remnants behind which caused the conflict.
Logged

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33881
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: Javascript & Active Content not working on the local machine
« Reply #3 on: February 09, 2009, 01:55:16 PM »

I'm honestly not sure where its come from - only that something changed my permissions to make my PC "more secure".
So bleeding secure that I cant use it to write and test any code locally on! :angry:

It was really doing my head in... even more so that it took a dive deep into the registry to resolve it. 

The only thing I can think of is Ashampoo WinOptimizer, as Avast is the only AV this PC has had on.
Some of you may recall I had a fit when I first ran it and it auto deleted many of my valid files which were things like my own code files and any monitoring files such as those from MRTG etc.  I had to recover something like 600+ files.
Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

mr_chris

  • Kitizen
  • ****
  • Posts: 3774
Re: Javascript & Active Content not working on the local machine
« Reply #4 on: February 09, 2009, 04:54:45 PM »

I don't trust those "Optimizer" programs very much. AShampoo is supposed to be one of the more reputable ones too isn't it.

Incidentally, looking into it further, these settings can be controlled on XP Pro using Group Policy (start / run gpedit.msc), and going through User Configuration -> Administrative Templates -> Windows Components -> Internet Explorer -> Internet Control Panel -> Security Page, and all the zones are editable from there.

Unfortunately XP Home doesn't have gpedit.msc so this won't work unless you have XP Pro (or MCE?)

Anyway, just thought I'd let you know :)
Logged
Chris