include files and/or parameters betw vbs-files 
Author Message
 include files and/or parameters betw vbs-files

Hi,

1. I've some vbs-files that uses the same connection-
string. Is it possible to have this constant in an include-
file that is "included" in the programs ? Other ways to do
it ?

2. Is it possible to have parameters when calling one vbs-
file to another ?

Now i use:
oShell.Run "wscript MyScript.vbs", 1, True

/Jerome



Mon, 22 Aug 2005 20:47:51 GMT  
 include files and/or parameters betw vbs-files

Quote:

> Hi,

> 1. I've some vbs-files that uses the same connection-
> string. Is it possible to have this constant in an include-
> file that is "included" in the programs ?

Use .wsf format and use the src attribute of the script tag.

Using Windows Script Files
http://msdn.microsoft.com/library/en-us/script56/html/wsadvantagesofw...

Quote:
> Other ways to do it ?

Put the information in a file and use the FileSystemObject to read it.

FileSystemObject Reference
http://msdn.microsoft.com/library/en-us/script56/html/fsooriscripting...

Put the information in the registry and use RegRead to read it.

RegRead Method
http://msdn.microsoft.com/library/en-us/script56/html/wsmthregread.asp

Quote:
> 2. Is it possible to have parameters when calling one vbs-
> file to another ?

> Now i use:
> oShell.Run "wscript MyScript.vbs", 1, True

Just like the command line--use the Arguments property:

  oShell.Run "wscript MyScript.vbs paramater list", 1, True

Arguments Property
http://msdn.microsoft.com/library/en-us/script56/html/wsproarguments.asp

Windows Script Documentation
http://msdn.microsoft.com/downloads/sample.asp?url=/MSDN-FILES/027/00...

--
Steve

He who allows oppression, shares the crime. -Erasmus Darwin



Mon, 22 Aug 2005 22:01:30 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. how to pass parameters in an include file which is included in an asp page

2. How do you pass parameters from a batch file to a VBS file

3. INCLUDE file in .VBS file?

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

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

6. how to call vbs file from vbs file

7. Include JavaScript file in another include file

8. parameters in a vbs file

9. How can i pass parameters to a VBScript (files *.vbs)

10. passing a parameter to a VBS file

11. Passing parameters to .Vbs files

12. parameters in a vbs file

 

 
Powered by phpBB® Forum Software