Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Wscript.Exec from ASP/VBScript -- should I Sleep?

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,26608
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Wscript.Exec from ASP/VBScript -- should I Sleep?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Wscript.Exec from ASP/VBScript -- should I Sleep? - 10/1/2005 5:02:04 AM   
  simonm

 

Posts: 1
Score: 0
Joined: 10/1/2005
Status: offline
Hello folks,

I'm hoping you might have some suggestions about the best way to invoke a server-side command line process from within an VBScript ASP page.

I'm using a WScript.Shell object and calling the Exec method on it, as shown in the standard Microsoft documentation -- but I'm having a bit of trouble with the "sleep while running" loop.

I had originally left that loop out, in favor of something more like the following:

      
However, in testing the server process for that page seemed to hang without completing.

So, I figured I needed to add in the sleep loop described in the MS docs:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wslrfExecMethod.asp

Now we're seeing a new error (VBScript runtime error '800a01a8' Object required: '') reported on the line number containing the WScript.Sleep command:

      

Can you folks confirm whether this kind of sleep loop is necessary, or whether the stdOut.ReadAll() will block until the process is done?

And is there some additional trick to invoking the Sleep method that I'm missing?

Any help would be appreciated. A relevant section of the source code is included below.

Many thanks,

-Simon





      
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Wscript.Exec from ASP/VBScript -- should I Sleep? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts