Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

ActiveXObject problem - WScript.Shell on Windows 2003 Server
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.examnotes.net ***

Report this thread to moderator Post Follow-up to this message
Old Post
Marcin Zmyslowski
06-01-05 01:55 PM


Re: ActiveXObject problem - WScript.Shell on Windows 2003 Server
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"



Report this thread to moderator Post Follow-up to this message
Old Post
Bob Barrows [MVP]
06-01-05 08:55 PM


Re: ActiveXObject problem - WScript.Shell on Windows 2003 Server
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.examnotes.net ***

Report this thread to moderator Post Follow-up to this message
Old Post
Marcin Zmyslowski
06-01-05 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:33 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.