Calling a .vbs file from another vbs 
Author Message
 Calling a .vbs file from another vbs

How can I run a .vbs file from another vbs ?

Jamie



Wed, 03 Dec 2003 09:48:31 GMT  
 Calling a .vbs file from another vbs
oooh this one is easy!
++++++++++++++++++++begin cod e=========

Set Shell = CreateObject("Wscript.Shell")
Shell.Run ( """Run.vbs""" ) 'this example assumes that "Run.VBS" is in the
same folder of running script file.



Wed, 03 Dec 2003 20:26:52 GMT  
 Calling a .vbs file from another vbs

Quote:

> oooh this one is easy!
> ++++++++++++++++++++begin cod e=========

> Set Shell = CreateObject("Wscript.Shell")
> Shell.Run ( """Run.vbs""" ) 'this example assumes that "Run.VBS" is in the
> same folder of running script file.

Easy but expensive: starts a new instance of the script interpreter.
better and more useful is:

Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
ExecuteGlobal fso.OpenTextFile("d:\documents\vbs\run.vbs").ReadAll
Set fso = Nothing

Dirk Vdm



Wed, 03 Dec 2003 22:53:08 GMT  
 Calling a .vbs file from another vbs
I stand corrected.   Thanks Dirk Vdm!  You learn something new everyday
right?  He is right Jaime.  His way is better.


Fri, 05 Dec 2003 06:00:48 GMT  
 Calling a .vbs file from another vbs

Quote:

> I stand corrected.   Thanks Dirk Vdm!  You learn something new everyday
> right?  He is right Jaime.  His way is better.

No problem ;-)
I learned at least 5 new things today...

Dirk Vdm



Fri, 05 Dec 2003 06:42:40 GMT  
 Calling a .vbs file from another vbs
I thank you both profusely !

Jamie




Quote:
> > I stand corrected.   Thanks Dirk Vdm!  You learn something new everyday
> > right?  He is right Jaime.  His way is better.

> No problem ;-)
> I learned at least 5 new things today...

> Dirk Vdm



Sun, 07 Dec 2003 05:01:48 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Calling *.vbs files to Run From Master VBS File

2. how to call vbs file from vbs file

3. Calling a vbs from another vbs

4. Add computer in domain with vbs or tools call by vbs

5. Newbie question - calling a VBS script from another VBS script

6. How to pass back variables from called vbs from vbs using wsh

7. Calling VBS file from JS file

8. How to call .vbs file from ASP.NET?

9. Logon Batch to call a VBS that calls another batch

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

11. Call a Subroutine Located in another .VBS file

12. calling functions from other vbs file

 

 
Powered by phpBB® Forum Software