[thelist] wscript.shell in ASP page
Joel D Canfield
joel at spinhead.com
Thu Sep 30 18:51:34 CDT 2004
This is driving me mad. Why does this work in an ASP page:
<%
Dim wshell, intReturn
set wshell = server.createobject("wscript.shell")
intReturn = wshell.run("%comspec% /c dir *.* > c:\test.txt", 0, True)
Response.Write( intReturn )
set wshell = nothing
%>
and this does not?
<%
Dim wshell, intReturn
set wshell = server.createobject("wscript.shell")
intReturn = wshell.run("%comspec% /c ftp.exe
-s:c:\inetpub\wwwroot\it\shelltest\test.ftp", 0, True)
Response.Write( intReturn )
set wshell = nothing
%>
The command itself
%comspec% /c ftp.exe -s:c:\inetpub\wwwroot\it\shelltest\test.ftp
works from a DOS prompt on the server. All files are in the same
directory on a Win2K server. Permissions are set to force basic
authentication; I'm logging in as a network administrator which is in
the local admin group as well.
I could swear I had this working three months ago when I got pulled off
the project, and now that I'm back, it's just as maddening as the first
go 'round.
thanks
joel
More information about the thelist
mailing list