Tech Support > Computers & Technology > Scripting & IE
Scripting & IE
Posted by Ian H on October 27th, 2003



Win 98se and IE 6

I have been using the following to turn off/on scripting within IE
when visiting sites that hijack IE causing popups etc.
A while ago it stopped working, and I'm not sure why

=========================================
// Double-click the file and answer the prompt.
// Written by Dan Rollins
//
oShell= new ActiveXObject(
"WScript.Shell")
var DISABLE= 3, ENABLE= 0;
var nRet= oShell.Popup(
"Do you want Scripting?\n"+
"Yes to Enable, No to "+
"Disable", 0, "Enable/"+
"Disable IE5 Active "+
"Scripting", 35
);
if (nRet==2) // 2 is Cancel
WScript.Application.Quit();
if (nRet==6) // 6 is Yes
nNewVal= ENABLE;
if (nRet==7) // 7 is No
nNewVal= DISABLE;

sName=
"HKCU\\Software\\Microsoft"+
"\\Windows\\CurrentVersion"+
"\\Internet Settings"+
"\\Zones\\3\\1400"

oShell.RegWrite( sName,
nNewVal,"REG_DWORD" );
===========================================

called scriptonoff.js

So what uses the "js" extension, so I can try to re-associate it.

Any help appreciated...Ian

Posted by °Mike° on October 27th, 2003


It has probably been set to use 'Edit' as default, which
is actually a good thing, and should be left that way.
To run the script, right click on the .js file and choose
'Open'. This prevents accidentally running malicious
javascript files.

If you MUST, you can re-enable running .js files as default,
by going to Windows Explorer / Tools / Folder Options /
File Types and scroll down to 'JScript Script File'. Highlight
'Open' and press 'Set Default'.

In case that option doesn't exist, the command should be:

C:\Windows\WScript.exe "%1" %*


On Mon, 27 Oct 2003 09:20:41 GMT, in
<b9nppvs7camc2jmkg4lgfakn9vb0c8hhsr@4ax.com>
Ian H scrawled:

<snip>

--
Basic computer maintenance
http://uk.geocities.com/personel44/maintenance.html

Posted by Ian H on October 28th, 2003


On Mon, 27 Oct 2003 22:04:26 +0000, °Mike°
<ZHNTPDWBLECA@fcnzzbgry.pbz> wrote:

Am now getting an error
Line 4
Char 1
Error Automation server cant create object
Code 800A01AD
Source Microsoft JScript runtime error


Very annoying when something used to work
Nothing changed in line 4 char 1

....Ian

Posted by °Mike° on October 28th, 2003


On Tue, 28 Oct 2003 09:41:52 GMT, in
<d6espv4qnhfqhlcmu2nha5rhv5csold5j8@4ax.com>
Ian H scrawled:

Try updating MDAC
http://www.microsoft.com/data/

<snip>

--
Basic computer maintenance
http://uk.geocities.com/personel44/maintenance.html

Posted by Ian H on October 29th, 2003


On Tue, 28 Oct 2003 19:45:40 +0000, °Mike°
<ZHNTPDWBLECA@fcnzzbgry.pbz> wrote:


....Ian

Posted by Ian H on October 31st, 2003


On Wed, 29 Oct 2003 03:09:29 GMT, Ian H <mac2564@_hotmail.com> wrote:

It throws up errors all the time....Ian


Similar Posts