how do i include a 2nd wsh file 
Author Message
 how do i include a 2nd wsh file

Dumb question,

how do I include a 2nd file into my WSH 5.5. file.  I want to include
adovbs.inc and don't really want to copy them into my main file.

I have looked all over the web but without success.

Any help greatly appreciated

Malcolm Clarke



Mon, 09 Jun 2003 17:22:08 GMT  
 how do i include a 2nd wsh file
You have to use the .wsf format to include files.

  <job>
  <script language="VBScript" src="adovbs.inc"/>
  <script language="vbscript">
    WScript.Echo "adOpenStatic =", adOpenStatic
  </script>
  </job>

However, adovbs.inc is for inclusion in .asp files and has <% %> tokens in
it. This will generate an "expected statement" error if you include it in a
.wsf file.

As long as you're using the .wsf format, though, you can use a reference to
an ADO object:

  <job>
  <reference object="ADODB.Recordset"/>
  <script language="vbscript">
    WScript.Echo "adOpenStatic =", adOpenStatic
  </script>
  </job>

=-=-=
Steve
-=-=-


Quote:
> Dumb question,

> how do I include a 2nd file into my WSH 5.5. file.  I want to include
> adovbs.inc and don't really want to copy them into my main file.

> I have looked all over the web but without success.

> Any help greatly appreciated

> Malcolm Clarke




Mon, 09 Jun 2003 20:59:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ho do i include a 2nd wsh file

2. how do i include a 2nd wsh file

3. Doing includes in WSH 2.0 beta?

4. Can I include other file into WSH file?

5. Can I include other file into WSH file?

6. Include JavaScript file in another include file

7. Extending WSH (including TS functions)

8. Equivalent of #include under WSH?

9. WSH and COM - Can this be done?

10. Include file for Javascript in WSH

11. to include a written .vbs file in wsh

12. Include files and WSH - a newbie question

 

 
Powered by phpBB® Forum Software