VB Script can be a good way to manage your SVS environment but often takes a lot of time. I found a quick and easy way to write VB scripts for SVS that'll impress your friends and amaze your loved ones.
Download the "WMI Code Creator" here and start it up.
- Make sure that the default code language is VB script.
- Now select the second tab named "Execute a method"
- Here you will see that it's defaulting to the namespace "root\CIMV2".
- Now change the path to "root\DEFAULT" by selecting the dropdown box.
- You see it contains 3 classes.
- Select the class named "AltirisVSProv".
- Now you can select a task from the "Methods" dropdown box -- there are 13 available.
- In this example I chose "Activate"
- As you see there's no parameter specified yet.
- Double-click on "LayerNameOrGuid". You see that it has to be a string value.
- You can type the name of the layer you want to activate and click "Ok".
- The parameter is added to the script now.
- You can now choose to execute the script or open it in notepad.
One thing of interest is that the source is included in the zip file of the "WMI Code Creator" so you can modify it to your own needs.
Unfortunately the code that "WMI Code Creator" produces for VB.NET and C#.NET is not working. If someone knows a workaround for this then please add it to this post.