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