ActiveXObject problem - WScript.Shell on Windows 2003 Server

Discussion in 'ASP General' started by Marcin Zmyslowski, Jun 1, 2005.

  1. Hello all!

    I have installed MSDE on my local computer - Windows 2000 Professional.
    I have created a function which runs me a link whose path is placed in
    the input field. This function looks like this:

    function runCommand(zmienna)
    {
    if (zmienna==-1)
    {
    var oShell = new ActiveXObject("WScript.Shell");
    oShell.run(document.forms('formularz_link_2').elements('link').value,
    1);
    }
    else
    {
    var oShell = new ActiveXObject("WScript.Shell");

    oShell.run(document.forms('formularz_link_2').elements('link')(zmienna-1
    ).value, 1);
    }
    }


    Everything is working fine, but only when files are located on my local
    computer (on local IIS, on my workstation). While moving these asp files
    into the IIS located on Windows 2003 Server, this function doesn`t work
    properly. I got the message that object
    var oShell = new ActiveXObject("WScript.Shell");
    cannot be created.

    Do you have any idea how to fix the problem?

    Kind regards
    Marcin


    *** Sent via Developersdex http://www.developersdex.com ***
     
    Marcin Zmyslowski, Jun 1, 2005
    #1
    1. Advertising

  2. Marcin Zmyslowski wrote:
    > Hello all!
    >
    > I have installed MSDE on my local computer - Windows 2000
    > Professional. I have created a function which runs me a link whose
    > path is placed in the input field. This function looks like this:
    >
    > function runCommand(zmienna)
    > {

    <snip>

    > Everything is working fine, but only when files are located on my
    > local computer (on local IIS, on my workstation). While moving these
    > asp files into the IIS located on Windows 2003 Server, this function
    > doesn`t work properly. I got the message that object
    > var oShell = new ActiveXObject("WScript.Shell");
    > cannot be created.
    >

    It is not clear whether this is client-side or server-side script. I
    suspect, given that the machine it is being run on affects the outcome,
    that it is client-side, which makes it off-topic for asp (you could probably
    reproduce your problem with a .htm page, correct? If so, it's not an asp
    issue). I suggest .scripting.jscript if it is a client-side script.

    If it is server-side script, then you are running into some security issues.
    I do not think wscript.shell is accessible in server-side code...


    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Jun 1, 2005
    #2
    1. Advertising

  3. I would like to have the same script as it`s on the workstation on local
    machine. This script let me run a link on the local machine (on local
    user machine). How to modify this script which could be make possibility
    to achieve such result?

    Thanx, Marcin from Poland


    *** Sent via Developersdex http://www.developersdex.com ***
     
    Marcin Zmyslowski, Jun 1, 2005
    #3
    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. =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?=

    ActiveXObject("Shell.Application")

    =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?=, May 16, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    5,184
    Alvin Bruney [MVP]
    May 17, 2007
  2. Bill
    Replies:
    3
    Views:
    669
  3. Guoqi Zheng
    Replies:
    0
    Views:
    377
    Guoqi Zheng
    Jan 25, 2004
  4. LamSoft
    Replies:
    2
    Views:
    177
    LamSoft
    Aug 4, 2006
  5. Replies:
    0
    Views:
    93
Loading...

Share This Page