[thelist] using wscript.shell to run commands
Joel D Canfield
joel at spinhead.com
Fri Jun 18 13:09:19 CDT 2004
I'm experimenting with wscript.shell for some automation. This code
returns no errors, but it doesn't do anything, either (I've run it on a
client, and on the web server.)
I'm expecting it to open a DOS window, change to the root directory, and
output a listing to the active window. Instead, nothing visible happens.
I have default perms on the web server - could that be it? I assumed
scripts would run, but perhaps, since I'm touching an executable, it
needs to be 'scripts and executables' ?
Anyway, does the code look right?
=================================
<%
Dim wshell, intReturn
set wshell = server.createobject("wscript.shell")
intReturn = wshell.run("%comspec% /k cd\ & dir *.*", 1, False)
Response.Write( intReturn )
set wshell = nothing
%>
<html>
<head>
<title>Testing WScript.Shell Object</title>
</head>
<body>
</body>
</html>
=================================
Thanks
joel
More information about the thelist
mailing list