A while ago I created a script that I can run as embedded script in Altiris that creates a Server Manager Answer File (for Server 2008).

I could have simply done an echo >answer.xml but I wanted a well formed XML that could be read and displayed in an XML editor or Internet Explorer when needed.

I use the Microsoft.XMLDom object in the script the create the XML and I think the code is easy to understand so I will just show it here:

Sample output: