Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / JScript / November 2005

Tip: Looking for answers? Try searching our database.

running from website

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DanC - 11 Nov 2005 00:40 GMT
Hallo;

This works perfect after compilation from the commandline.

var objWShell = new ActiveXObject("WScript.Shell");
var objCmd = objWShell.Exec("cscript.exe x:\\sasys\\sasysweb\\sasysdag.js  
/?");

 while (objCmd.Status == 0)
 {}

var  strPResult = objCmd.StdOut.Readall();
print(strPResult);

But not when it is called from a ASP page like this: (VBscript)

<%
   Set objWShell = CreateObject("WScript.Shell")
   Set objCmd = objWShell.Exec("x:\sasys\sasysweb\test2.exe")
       Do While objCmd.Status = 0

       Loop

   strPResult = objCmd.StdOut.Readall()
   Set objWShell = nothing
   set objCmd = nothing
   response.write ".<br>" & replace(strPResult,vbCrLf,"<br>")
   
%>

Putting a print-command after the first line learns that is goes wrong in
the first line.

Any suggestions?

Tnx
Bruce Barker - 11 Nov 2005 16:53 GMT
tweo possible issues:

1) test2 is a windows app and cannot open a window so it exits
2) x: is network share, and the asp account is not a domain account with
network access
3) x: is network share, and impersonation is on, but you are not using
kerberos, so not network access is allowed

-- bruce (sqlwork.com)

> Hallo;
>
[quoted text clipped - 32 lines]
>
> Tnx
DanC - 15 Nov 2005 22:08 GMT
> tweo possible issues:
>
> 1) test2 is a windows app and cannot open a window so it exits

Who can you explain that "hello world.exe" works fine?

> 2) x: is network share, and the asp account is not a domain account with
> network access
> 3) x: is network share, and impersonation is on, but you are not using
> kerberos, so not network access is allowed

Has nothing to do beacause it is running serverside.

> -- bruce (sqlwork.com)
>
[quoted text clipped - 34 lines]
> >
> > Tnx

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.