WshShell.Run problem 
Author Message
 WshShell.Run problem

I have the crazy notion that in the following code VBScript should
execute "write" and then wait until "write" is closed.

But the box created by the <WScript.Echo "RC = " & rc>-statement pops up
before "write" does.

Have I misunderstood the meaning of the [bWaitOnReturn] parameter?

Is there another way to do it?

Thanks in advance for any help!

Anders Tobiasen

Dim WshShell, rc

set WshShell = WScript.CreateObject("WScript.Shell")

rc = RunIt("write " & Wscript.ScriptFullName)
WScript.Echo "RC = " & rc

Function RunIt(Prog)

   RunIt = WshShell.Run(Prog, 1, TRUE)

end function



Sun, 25 Feb 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. WshShell.Run - problem

2. WsHShell.Run Problem

3. WshShell.Run vs WshShell.Exec

4. runas with WshShell.Exec versus WshShell.Run

5. Problem with WshShell.Run

6. WshShell.Run (Newbie Problem)

7. Problem: WSHShell.run returns ErrCode under NT 4.0

8. wshshell.run: I can't run when there is a space in the path

9. Running COMMAND.COM with WshShell.Run

10. WshShell.Run don't run WHY ???

11. Batch file won't run with WshShell.run

12. Script stops after WshShell.Run

 

 
Powered by phpBB® Forum Software