Scripting & IE

Discussion in 'Computer Support' started by Ian H, Oct 27, 2003.

  1. Ian H

    Ian H Guest

    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
     
    Ian H, Oct 27, 2003
    #1
    1. Advertising

  2. Ian H

    Harrison Guest

    ..js is the extension for java script, and it runs using the Microsoft
    Windows Based Script Host.
    Here is a link the origin of the file.
    http://www.pcmag.com/article2/0,4149,589,00.asp

    On Mon, 27 Oct 2003 09:20:41 GMT, Ian H <mac2564@_hotmail.com> wrote:

    >
    >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
     
    Harrison, Oct 27, 2003
    #2
    1. Advertising

  3. Ian H

    °Mike° Guest

    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
    <>
    Ian H scrawled:

    >
    >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


    <snip>

    >called scriptonoff.js
    >
    >So what uses the "js" extension, so I can try to re-associate it.
    >
    >Any help appreciated...Ian


    --
    Basic computer maintenance
    http://uk.geocities.com/personel44/maintenance.html
     
    °Mike°, Oct 27, 2003
    #3
  4. Ian H

    Ian H Guest

    On Mon, 27 Oct 2003 22:04:26 +0000, °Mike°
    <> wrote:

    >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" %*


    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
    >
    >On Mon, 27 Oct 2003 09:20:41 GMT, in
    > <>
    > Ian H scrawled:
    >
    >>
    >>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

    >
    ><snip>
    >
    >>called scriptonoff.js
    >>
    >>So what uses the "js" extension, so I can try to re-associate it.
    >>
    >>Any help appreciated...Ian
     
    Ian H, Oct 28, 2003
    #4
  5. Ian H

    °Mike° Guest

    On Tue, 28 Oct 2003 09:41:52 GMT, in
    <>
    Ian H scrawled:

    >On Mon, 27 Oct 2003 22:04:26 +0000, °Mike°
    ><> wrote:
    >
    >>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" %*

    >
    >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


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

    <snip>

    --
    Basic computer maintenance
    http://uk.geocities.com/personel44/maintenance.html
     
    °Mike°, Oct 28, 2003
    #5
  6. Ian H

    Ian H Guest

    On Tue, 28 Oct 2003 19:45:40 +0000, °Mike°
    <> wrote:

    >On Tue, 28 Oct 2003 09:41:52 GMT, in
    > <>
    > Ian H scrawled:
    >
    >>On Mon, 27 Oct 2003 22:04:26 +0000, °Mike°
    >><> wrote:
    >>
    >>>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" %*

    >>
    >>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

    >
    >Try updating MDAC
    >http://www.microsoft.com/data/
    >
    ><snip>

    Updated MDAC 2.8 with no change to problem

    ....Ian
     
    Ian H, Oct 29, 2003
    #6
  7. Ian H

    Ian H Guest

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

    >On Tue, 28 Oct 2003 19:45:40 +0000, °Mike°
    ><> wrote:
    >
    >>On Tue, 28 Oct 2003 09:41:52 GMT, in
    >> <>
    >> Ian H scrawled:
    >>
    >>>On Mon, 27 Oct 2003 22:04:26 +0000, °Mike°
    >>><> wrote:
    >>>
    >>>>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" %*
    >>>
    >>>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

    >>
    >>Try updating MDAC
    >>http://www.microsoft.com/data/
    >>
    >><snip>

    >Updated MDAC 2.8 with no change to problem
    >
    >...Ian

    JScripting is just not working on my PC
    It throws up errors all the time....Ian
     
    Ian H, Oct 31, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    634
  2. BillM

    Scripting and Mozilla Browser

    BillM, Sep 24, 2003, in forum: Firefox
    Replies:
    0
    Views:
    1,008
    BillM
    Sep 24, 2003
  3. Chuck

    Scripting for Admins Class????

    Chuck, Nov 26, 2003, in forum: Microsoft Certification
    Replies:
    0
    Views:
    454
    Chuck
    Nov 26, 2003
  4. =?Utf-8?B?cGZyYW1wdG8=?=

    remote web workspace scripting error

    =?Utf-8?B?cGZyYW1wdG8=?=, Apr 20, 2004, in forum: Microsoft Certification
    Replies:
    0
    Views:
    465
    =?Utf-8?B?cGZyYW1wdG8=?=
    Apr 20, 2004
  5. Alan

    intermediate scripting training

    Alan, Jul 7, 2004, in forum: Microsoft Certification
    Replies:
    0
    Views:
    432
Loading...

Share This Page