Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ActiveXObject problem - WScript.Shell on Windows 2003 Server

Reply
Thread Tools

ActiveXObject problem - WScript.Shell on Windows 2003 Server

 
 
Marcin Zmyslowski
Guest
Posts: n/a
 
      06-01-2005
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').elem ents('link').value,
1);
}
else
{
var oShell = new ActiveXObject("WScript.Shell");

oShell.run(document.forms('formularz_link_2').elem ents('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 ***
 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      06-01-2005
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"


 
Reply With Quote
 
 
 
 
Marcin Zmyslowski
Guest
Posts: n/a
 
      06-01-2005

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 ***
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to call an windows program with ActiveXObject and load a file aswell? DL Javascript 21 07-03-2009 06:19 AM
Windows XP Command Prompt - called via ActiveXObject czechboy Javascript 0 04-21-2008 06:35 PM
Server.CreateObject() vs new ActiveXObject() Andrew Hilton ASP General 4 03-03-2006 02:00 PM
Windows 2003 Server or Exchange Server 2003 first????? Ozzie MCSA 1 11-30-2004 01:10 AM
ActiveXObject, Problem loading into DOM Nomad XML 1 09-10-2004 10:38 PM



Advertisments