To all the VBS Gurus out there...
I have written a suite of VB scripts (for automating installs, if you must know) which use a set of common functions for thing like logging, starting/stopping services etc.
I have come up with a design which uses a script which contains the common functions in a class. It also declares and instantiates a variable of the class type.
I also have a 'loader' script which checks to see if the class object exists and if it doesn't, runs the class script.
Each script I write includes a call to the loader, then I can call methods of the instantiated class.
It is quite a neat solution (IMHO) but I was wondering if anyone had any other/better ways of achieving the same?
- Pete
Note: This only applies to VB Scripts in .vbs files