Automate the Population of SGSS 1.1 to 2.x Resources
This is a mirror of my forum post with attachments instead of the code in the post.
!!!! I AM POSTING THIS INFORMATION FOR EDUCATIONAL PURPOSES ONLY. USE AT YOUR OWN RISK !!!
At the request of others I just thought I'd share the script I created to automatically populate our 100+ Ghost consoles with our library of AIs and Images. The script looks for a config file called CONTENT.CFG, which contains a text list of the paths to look for AIs and Images. Please note that we set the DBA password during the install of the Ghost Console using the script supplied by Symantec. not only does this script populate the AIs and images into the resource list, it will replace any AI or image that has been superseded by a newer rev. Of course, this requires a naming standard. All our AIs and images are named as follows:
- Standard-AI-Name_x-x-x.exe
- Standard-Image-Name_x-x-x.gho
If the last "x" is the only change between what's in the DB and the new file found, then the AI or image entry is updated automatically. This will update all tasks associated with that resource. Otherwise, a new resource is created. After the updates are complete, a cleanup routine goes and looks in the database for resources that no longer exist, and removes them from any associated tasks, and then from the resource list altogether.
I wrote this in a weekend, but it's had a few revisions over the years. The description above doesn't quite explain everything it does, but you scripting guys should be able to figure the rest out. Any thoughts or comments (new ideas) are more than welcome. Please don't ask me for ongoing support as my wife will KILL me!