Home > Archive > ASP > June 2005 > ActiveXObject problem - WScript.Shell on Windows 2003 Server
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
ActiveXObject problem - WScript.Shell on Windows 2003 Server
|
|
| Marcin Zmyslowski 2005-06-01, 8:55 am |
| 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 ***
| |
| Bob Barrows [MVP] 2005-06-01, 3:55 pm |
| 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"
| |
| Marcin Zmyslowski 2005-06-01, 3:55 pm |
|
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 ***
|
|
|
|
|