[thelist] using wscript.shell to run commands (again)

Joel D Canfield joel at spinhead.com
Mon Jun 21 15:35:57 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.

Dim wshell, intReturn
set wshell = server.createobject("wscript.shell")
intReturn = wshell.run("%comspec% /k cd\ & dir *.*", 1, False)
Response.Write( intReturn )
set wshell = nothing
	<title>Testing WScript.Shell Object</title>


More information about the thelist mailing list