Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why doesn't this VBscript execution just "hang" in ASP?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Hi there,

I have a *.vbs file that I wish to execute in an ASP page. This is the
code below, and I was wondering if anyone could see anything below
that would explain why the web page would be in a "waiting for reply"
stance since something is executing.

Dim cmdstr
Dim wshellz

cmdstr = "cscript.exe c:\MakeWebSite.vbs -r c:\testdir -h
""whatever.com"" -t ""giuhgighirhi.com"""

set wshellz = Server.CreateObject("WScript.Shell")

wshellz.Run cmdstr, 0, true
set wshellz = nothing


Outside the ASP process the app works fine. The only change in
the code I have to do is to remove the Server. from
Server.CreateObject("WScript.Shell") line.

I've given the script enough permissions to execute correctly too.
Everyone has permissions to execute the script but I don't know if
there ASP process has the "permissions" for the script to alter IIS
stuff though (that is what the script that is being executed does).

I don't know what else to do. (Lead me in the right direction... :)
)

Any help will be most appreciated!

Thanxs

Steve Griff

 
Well, I have had this problem in the past. And I know exactly what went wrong in MY script. Simply put, the program youre running ran into a problem (such as no file found or a y/n question needed to be answered and you put 0 for the window type so you cant see it. Also, you put True so that the script youre running wont continue running until the app you ran from the script stops running!

So, try running with 0, false (if your running an app on your server, and try running 4, false locally a few times. Then you will see what the error or question cscript is asking you.

I really hope this helps you out! This is my first answer to a question so be nice heheheh...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top