Newbie question - calling a VBS script from another VBS script 
Author Message
 Newbie question - calling a VBS script from another VBS script

Hi gang,

  I'm a newbie to windows scripting host, but I've spent read the
documentation and am still stuck.  Maybe this can't be done...

  I have two scripts on my desktop ... the first is test1.vbs, and the
second, by coincidence, I've called test2.vbs.   Each one works fine.

  Now, I'd like a third file on my desktop -- test3.vbs -- which will
first cause test1.vbs to execute, followed by test2.vbs

   This must be easy.  But I'm baffled.  What should be inside of
test3.vbs?

Thanks!  



Fri, 30 Sep 2005 05:42:24 GMT  
 Newbie question - calling a VBS script from another VBS script
You could try something like:

set oWSh = CreateObject("WScript.Shell")
oWSh.Run "WScript test1.vbs", 0, true       '0 => hide; true => sychronous
oWSh.Run "WScript test2.vbs", 0, true       '0 => hide; true => sychronous

You may need to put in the complete path to test1 and test2.vbs
Csaba Gabor

Quote:

> Hi gang,

>   I'm a newbie to windows scripting host, but I've spent read the
> documentation and am still stuck.  Maybe this can't be done...

>   I have two scripts on my desktop ... the first is test1.vbs, and the
> second, by coincidence, I've called test2.vbs.   Each one works fine.

>   Now, I'd like a third file on my desktop -- test3.vbs -- which will
> first cause test1.vbs to execute, followed by test2.vbs

>    This must be easy.  But I'm baffled.  What should be inside of
> test3.vbs?

> Thanks!




Fri, 30 Sep 2005 07:05:48 GMT  
 Newbie question - calling a VBS script from another VBS script

Quote:

> You could try something like:

> set oWSh = CreateObject("WScript.Shell")
> oWSh.Run "WScript test1.vbs", 0, true       '0 => hide; true => sychronous
> oWSh.Run "WScript test2.vbs", 0, true       '0 => hide; true => sychronous

> You may need to put in the complete path to test1 and test2.vbs
> Csaba Gabor


> > Hi gang,

> >   I'm a newbie to windows scripting host, but I've spent read the
> > documentation and am still stuck.  Maybe this can't be done...

> >   I have two scripts on my desktop ... the first is test1.vbs, and the
> > second, by coincidence, I've called test2.vbs.   Each one works fine.

> >   Now, I'd like a third file on my desktop -- test3.vbs -- which will
> > first cause test1.vbs to execute, followed by test2.vbs

> >    This must be easy.  But I'm baffled.  What should be inside of
> > test3.vbs?

> > Thanks!


Thank you Csaba  ...  that works like a charm.  BIG THANKS!
-Cliff


Fri, 30 Sep 2005 10:57:26 GMT  
 Newbie question - calling a VBS script from another VBS script

Shell.exe?



Tue, 08 Nov 2005 11:00:04 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. newbie question - vbs login script & w9x

2. Running a .vbs script from within a .vbs script

3. Include another VBS script file in a main VBS script

4. newbie question (call vbs-function)

5. WSH/VBS Login Script Calls

6. Newbie needing help with VBS Scripting

7. NEWBIE debug vbs script

8. Call part of one VBS script from another?

9. Calling a remote .vbs script

10. Calling / Running Multiple VBS scripts from one file

11. return codes from .vbs scripts called from C using system()

12. calling vbs script from HTA

 

 
Powered by phpBB® Forum Software