How to make an include file in WSH ? 
Author Message
 How to make an include file in WSH ?

Is there a possibility to include a file in WSH just as in ASP programs
?
It could be : include toto.wsh.

Thanks.

  sjaillet.vcf
< 1K Download


Sat, 20 Jul 2002 03:00:00 GMT  
 How to make an include file in WSH ?
There are two ways. If you are using a .VBS file then you can use the
following function:

Function Include ( ByVal filename )

   dim fso: set fso = CreateObject("Scripting.FileSystemObject")
   Include = fso.FileExists(filename)

   if Include then
      dim tso: set tso = fso.OpenTextFile(filename)
      ExecuteGlobal tso.ReadAll
      tso.Close
   end If

End Function

If you are using .WSF files then you add a line like the following to your
script header:

<script language="VBScript" src="\\ems-nt1\vbinclude\sort.vbs"/>

Note that you must substitute your fully qualified file and path name for
="\\ems-nt1\vbinclude\sort.vbs"


Quote:
> Is there a possibility to include a file in WSH just as in ASP programs
> ?
> It could be : include toto.wsh.

> Thanks.



Sat, 20 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. WSH that makes a url file Makes BlueDragon.url

2. Can I include other file into WSH file?

3. Can I include other file into WSH file?

4. Include JavaScript file in another include file

5. how do i include a 2nd wsh file

6. Include file for Javascript in WSH

7. ho do i include a 2nd wsh file

8. to include a written .vbs file in wsh

9. Include files and WSH - a newbie question

10. Include files in WSH?

11. include files in WSH script

12. Q : how to include a file from WSH

 

 
Powered by phpBB® Forum Software