All Forums >> [Scripting] >> Post a VBScript >> XML-based Mapped Drives script for logon scripts Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
I thought others might find this useful. I've been converting our login scripts from KIX to VBS and, much as I loathe KIX, I do admire its ability to handle INI files. So, when it came to writing the part of the script that mapped the user's network drives I wanted to have a similar method.
This is what I came up with in the end
The format of the XML file is as follows
Each drive mapping requires three nodes
Group, UNCPath and DriveLetter. The Group node has the attribute "NAME" which is equal to the name of the AD security group associated with the share. The UNCPath and drive letter nodes are pretty self-explanatory I guess ;)
Anyway, I thought this was a better way of doing things as it makes future management of this part of the login script easy. All people have to do is amend the XML file accordingly for each share.
I haven't included the WriteToErrorLog sub as it's obviously quite site-specific. Suffice to say it simply takes the string passed to it and writes it to a text file somewhere.
< Message edited by ginolard -- 9/25/2007 1:39:25 AM >