Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


XML-based Mapped Drives script for logon scripts

 
Logged in as: Guest
arrSession:exec spGetSession 2,16,52191
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
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!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 XML-based Mapped Drives script for logon scripts - 9/25/2007 1:37:00 AM   
  ginolard


Posts: 1021
Score: 21
Joined: 8/10/2005
Status: offline
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 >


_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm
 
 
Revisions: 2 | Post #: 1
 
 RE: XML-based Mapped Drives script for logon scripts - 9/25/2007 2:17:58 AM   
  dm_4ever


Posts: 2414
Score: 38
Joined: 6/29/2006
From: Orange County, California
Status: offline
I like the simplicity of it and think an XML file would be a great way to manage drive mappings and avoid having someone break the login script.

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ginolard)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Post a VBScript >> XML-based Mapped Drives script for logon scripts Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts