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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP spawning vbscript

Status
Not open for further replies.

westmanm

ISP
Oct 14, 2003
29
0
0
US
I'm trying to get an ASP script to spawn another VBScript. I can run the VBScript manually from command-line, but when I try to get the ASP page to run it, nothing happens. Can anybody tell me what's going on here?
Code:
Set oShell = Server.CreateObject("Wscript.Shell")
oShell.Run "%ComSpec% /c wscript c:\home\hnt5c126\secure\notify.vbs FBF69696969", 0, false
Also, what does the ,0 ,false mean?

Thanks
Mike
 
Hello westmanm,

[1] Second parameter intWindowStyle = 0 means "Hides the window and activates another window". Practically, it means running on the backgroud.
[2] Third parameter bWaitOnReturn = false means "return immediately after starting the program, automatically returning 0 (not to be interpreted as an error code)". In practice, it means run the cmd line asychronously.
[3] As server is not a user, your notify.vbs should not contain any interactive device also host the script with cscript rather than wscript would be better.

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top