ActiveXObject problem - WScript.Shell on Windows 2003 Server

  • Thread starter Marcin Zmyslowski
  • Start date
M

Marcin Zmyslowski

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
 
B

Bob Barrows [MVP]

Marcin said:
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)
{
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
 
M

Marcin Zmyslowski

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top