Sign in to follow this  
Followers 0
4ggr35510n

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

7 posts in this topic

Greetings!

Short question, as in topic.

Is there any way - like in Firefox or Opera - to prevent page-content javascript from executing?

BR,

4gr

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Bump

Does anyone could help me?

Share this post


Link to post
Share on other sites

did you ever figure this out?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0