Jump to content

Internet Explorer UDF: How to remotely prevent Javascript from executing?


Recommended Posts

There's NoScript for Firefox and similar add-ons for other browsers, and security settings in every browser that can disable scripts globally.

In IE, you would go to:

Tools|Internet Options|Security tab|Custom Level|Scripting section|Click Disable or Enable for various options.

That could be enforced by policy if required.

:graduated:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Thank you for your answer!

Yet it doesn't solve my problem. I need to change properties from Internet Options with my Autoit Script, remotely.

In Firefox - for example - I could change 'javascript.enabled' value in about:config using _FFPrefSet function. One function, one change - without using my hands :]

In Internet Explorer - and IE.au3 UDF - I can change similar properties using _IEPropertySet. I know how to disable javascript manually. Yet I don't know what's the property name for javascript disabling (or enabling), so I dunno how to change it using only UDF .

BR,

4gr

Link to comment
Share on other sites

  • 3 weeks later...

Seems to be quite complex. As I read it, you'll have to tweak the zone definition.

http://support.microsoft.com/default.aspx?scid=KB;en-us;q182569

Edit:

The easiest way seems to be to assign a site with the domain switch to zone 4 (Restricted Sites Zone).

#include <IE.au3>
$sURL = "internet.com"
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\" & $sURL, "http", "REG_DWORD", 4)
$oIE = _IECreate("http://javascript.internet.com/games/button-mania.html")
RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\" & $sURL, "http")
Edited by KaFu
Link to comment
Share on other sites

Try this:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\X\

Where X is the number from 0 to 4 representing the security zones.

Set this ;

1400 Scripting: Active scripting

1402 Scripting: Scripting of Java applets

to 3 which means disable. Do it for every zone.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...