[gptalk] Re: Vbs logon script for mapped drives - one group having problems

  • From: Darren Mar-Elia <darren@xxxxxxxxxx>
  • To: gptalk@xxxxxxxxxxxxx
  • Date: Mon, 10 Nov 2008 13:56:33 -0800

Right. Just keep in mind that run logon scripts synchronously means, "run 
script #1 to completion before running Script #2" rather than "run scripts #1 
and #2 at the same time". With this particular problem, running scripts 
synchronously is probably less helpful than the "Wait for network" policy or 
the KB that Jamie refers to.

Darren

-----Original message-----
From: "Odiorne, Derek" derek.odiorne@xxxxxxxxxx
Date: Mon, 10 Nov 2008 13:27:37 -0500
To: gptalk@xxxxxxxxxxxxx
Subject: [gptalk] Re: Vbs logon script for mapped drives - one group having 
problems

> I always use this setting in conjuction with "run logon scripts
> synchronously".
> 
>  
> 
> ----------------------------
> 
> Thanks,
> 
>  
> 
> Derek A. Odiorne
> 
>  
> 
>  
> 
> ________________________________
> 
> From: gptalk-bounce@xxxxxxxxxxxxx [mailto:gptalk-bounce@xxxxxxxxxxxxx]
> On Behalf Of Nelson, Jamie
> Sent: 11/10/2008 1:24 PM
> To: gptalk@xxxxxxxxxxxxx
> Subject: [gptalk] Re: Vbs logon script for mapped drives - one group
> having problems
> 
>  
> 
> Andrew may be correct here. At lot of time with startup/logon scripts
> you run into a race condition between GP Processing and the
> initialization of the network adapter. If so, you'll see errors in the
> Event log about being able to find the script.
> 
>  
> 
> In addition to Andrew's suggestion below, see the following KB for
> another possible resolution.
> 
>  
> 
> http://support.microsoft.com/kb/840669
> 
>  
> 
> Regards,
> 
>  
> 
> Jamie Nelson | Operations Consultant | BI&T Infrastructure-Intel | Devon
> Energy Corporation | Work: 405.552.8054 | Mobile: 405.200.8088 |
> http://www.dvn.com <http://www.dvn.com/> 
> 
>  
> 
> From: gptalk-bounce@xxxxxxxxxxxxx [mailto:gptalk-bounce@xxxxxxxxxxxxx]
> On Behalf Of Andrew McHale
> Sent: Monday, November 10, 2008 10:12 AM
> To: gptalk@xxxxxxxxxxxxx
> Subject: [gptalk] Re: Vbs logon script for mapped drives - one group
> having problems
> 
>  
> 
> 
> Have you tried enabling:
> 
> 
>  
> 
> 
> "Computer Configuration\Administrative Templates\System\Logon\Always
> wait for the network at computer startup and logon"
> 
> 
>  
> 
> 
> Could be that at first logon your machine hasn't finished connecting to
> the network?
> 
> 
>  
> 
> Disclaimer: If this is completely irrelevant ignore the new kid and feel
> good about knowing more than I do ;)
> 
>  
> 
> From: Booker.Washington@xxxxxxxxxxxxxx
> [mailto:Booker.Washington@xxxxxxxxxxxxxx] 
> Sent: 10 November 2008 15:48
> To: gptalk@xxxxxxxxxxxxx
> Subject: [gptalk] Re: Vbs logon script for mapped drives - one group
> having problems
> 
>  
> 
> Just as a quick update, I made the change, but today, my laptop was a
> "victim"  After booting up cold from being connected to my home network,
> my maped drive did not show.  I logged off and back on, and my mapped
> drive was there.  
> 
>  
> 
> Booker T. Washington III
> 
> Systems Support Specialist
> 
>  
> 
> From: gptalk-bounce@xxxxxxxxxxxxx [mailto:gptalk-bounce@xxxxxxxxxxxxx]
> On Behalf Of Booker.Washington@xxxxxxxxxxxxxx
> Sent: Thursday, November 06, 2008 4:46 PM
> To: gptalk@xxxxxxxxxxxxx
> Subject: [gptalk] Re: Vbs logon script for mapped drives - one group
> having problems
> 
>  
> 
> Absolutely not, in terms of no other complaints (smile).  That normally
> just means, they have not called the help desk yet.
> 
>  
> 
> But, I just remembered that  I don't think I set it to wait for the
> script to run before logging on.  And I usually set that!!!
> 
>  
> 
> Ok, let me make that change and continue to monitor.......I think that
> may be the case, it might explain the intermittent nature, i.e,
> sometimes the script runs before the logon process is complete, and
> maybe sometimes the logon process completes without running the script?
> 
>  
> 
> Each matching case produces an action
> 
>  
> 
> No drive letter assignment for removable drives or use sticks.
> 
>  
> 
> Thanks
> 
>  
> 
> Booker T. Washington III
> 
> Systems Support Specialist
> 
>  
> 
> From: gptalk-bounce@xxxxxxxxxxxxx [mailto:gptalk-bounce@xxxxxxxxxxxxx]
> On Behalf Of Omar Droubi
> Sent: Thursday, November 06, 2008 4:38 PM
> To: gptalk@xxxxxxxxxxxxx
> Subject: [gptalk] Re: Vbs logon script for mapped drives - one group
> having problems
> 
>  
> 
> just cause you haven't gotten complaints doesn't mean that it is
> working- does it?
> 
>  
> 
> Any chance the script is just not running for the particular user
> logons?
> 
>  
> 
> are you forcing the logon process to wait for the script? are notebooks
> involved? is wireless networking involved?
> 
>  
> 
> Also- maybe you would be interested is using the GPO preference options
> for mapping drives- I find that it works pretty well- especially if
> every users gets a user or personal drive and then they get departmental
> or project related mapped drives as well. 
> 
>  
> 
> I also have a big issue regarding users who are in multiple groups
> causing problems as you reuse drive letters based on groups
> 
>  
> 
> It has been a short while since I used select/case statements- but does
> the 1st apply then it exits or does each matching case result in an
> action?
> 
> 
> Strange that a reboot would fix it-maybe there is a drive letter
> assignment for a removable drive or usb stick or a card slot in the
> workstation for memory sticks?
> 
>  
> 
> Omar Droubi
> 
> omar@xxxxxxxxxxxxxxxxxxxxx
> 
> 650-726-0300
> 
> ________________________________
> 
> From: gptalk-bounce@xxxxxxxxxxxxx [gptalk-bounce@xxxxxxxxxxxxx] On
> Behalf Of David Palombi [dave.palombi@xxxxxxxxx]
> Sent: Thursday, November 06, 2008 01:18 PM
> To: gptalk@xxxxxxxxxxxxx
> Subject: [gptalk] Re: Vbs logon script for mapped drives - one group
> having problems
> 
> This is what we have for our login script.  This is just a snippet of
> the code.
> 
>  
> 
> If (IsMember(objUser, "PERFORMANCE") = True) Then
>  objNetwork.MapNetworkDrive "v:", "\\bluewater\performance$
> <file:///\\bluewater\performance$> ", False
> End If
> 
>  
> 
> David Palombi
> 
>       ----- Original Message ----- 
> 
>       From: Booker.Washington@xxxxxxxxxxxxxx 
> 
>       To: gptalk@xxxxxxxxxxxxx 
> 
>       Sent: Thursday, November 06, 2008 4:07 PM
> 
>       Subject: [gptalk] Vbs logon script for mapped drives - one group
> having problems
> 
>        
> 
>       I have the following vbs script below.  The script maps drives
> based on the users group membership
> 
>        
> 
>       For some members of the group MGT Undergraduate Office, they
> report that "sometimes" when they login the drive will not map, but if
> they restart, then the drive shows.  Obviously, that is not ideal, so I
> am trying to figure out where to start troubleshooting to see why this
> is occurring.
> 
>        
> 
>       So far in my testing, I have not heard complaints from the one
> other group that is a part of my test roll out of this logon script
> 
>        
> 
>       On Error Resume Next
> 
>        
> 
>       Set objSysInfo = CreateObject("ADSystemInfo")
> 
>       Set objNetwork = CreateObject("Wscript.Network")
> 
>        
> 
>       strUserPath = "LDAP://" & objSysInfo.UserName
> 
>       Set objUser = GetObject(strUserPath)
> 
>        
> 
>       'Removes curent mappings
> 
>       objNetwork.RemoveNetworkDrive "L:", True, True
> 
>       objNetwork.RemoveNetworkDrive "J:", True, True
> 
>       objNetwork.RemoveNetworkDrive "Z:", True, True
> 
>       objNetwork.RemoveNetworkDrive "R:", True, True
> 
>       objNetwork.RemoveNetworkDrive "N:", True, True
> 
>       objNetwork.RemoveNetworkDrive "O:", True, True
> 
>       objNetwork.RemoveNetworkDrive "U:", True, True
> 
>       objNetwork.RemoveNetworkDrive "S:", True, True
> 
>       objNetwork.RemoveNetworkDrive "M:", True, True
> 
>       objNetwork.RemoveNetworkDrive "I:", True, True
> 
>       objNetwork.RemoveNetworkDrive "K:", True, True
> 
>       objNetwork.RemoveNetworkDrive "Z:", True, True
> 
>       objNetwork.RemoveNetworkDrive "X:", True, True
> 
>       objNetwork.RemoveNetworkDrive "Y:", True, True
> 
>       objNetwork.RemoveNetworkDrive "Q:", True, True
> 
>        
> 
>       'Finds users group membership
> 
>       For Each strGroup in objUser.MemberOf
> 
>       strGroupPath = "LDAP://" & strGroup
> 
>       Set objGroup = GetObject(strGroupPath)
> 
>       strGroupName = objGroup.CN
> 
>        
> 
>        
> 
>       'Mappings for all users
> 
>       'objNetwork.MapNetworkDrive "T:",
> "\\nas1.prism.myschool.com\com\profiles\%username%\My Documents"
> 
>       'wscript.Echo strUser.userName
> 
>        
> 
>        
> 
>       'Mappings Based on Group Membership
> 
>       'wscript.Echo objGroup.CN
> 
>       Select Case strGroupName
> 
>        
> 
>       Case "MGT IT Services Group"
> 
>       objNetwork.MapNetworkDrive "Y:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\IT services"
> 
>        
> 
>       'Case "MGT Accounting"
> 
>       'objNetwork.MapNetworkDrive "R:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Accounting"
> 
>        
> 
>       Case "MGT Career Services"
> 
>       objNetwork.MapNetworkDrive "L:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Career Services"
> 
>       objNetwork.MapNetworkDrive "j:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Career Svcs_Act"
> 
>       objNetwork.MapNetworkDrive "z:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Undergraduate
> Office"
> 
>        
> 
>       Case "MGT Career Services SAs"
> 
>       objNetwork.MapNetworkDrive "L:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Career Services"
> 
>       objNetwork.MapNetworkDrive "j:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Career Svcs_Act"
> 
>       objNetwork.MapNetworkDrive "z:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Undergraduate
> Office"
> 
>        
> 
>        
> 
>       Case "MGT CIBER"
> 
>       objNetwork.MapNetworkDrive "R:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\CIBER"
> 
>        
> 
>       Case "MGT CIBER GRAs"
> 
>       objNetwork.MapNetworkDrive "R:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\CIBER"
> 
>        
> 
>        
> 
>       Case "MGT Communications"
> 
>       objNetwork.MapNetworkDrive "R:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Communications"
> 
>       objNetwork.MapNetworkDrive "N:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\DeanSuite"
> 
>        
> 
>       Case "MGT Communications Share Guest access"
> 
>       objNetwork.MapNetworkDrive "R:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Communications"
> 
>       objNetwork.MapNetworkDrive "N:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\DeanSuite"
> 
>        
> 
>        
> 
>       Case "MGT Dean Suite non HR"
> 
>       objNetwork.MapNetworkDrive "L:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Building Operations"
> 
>       objNetwork.MapNetworkDrive "N:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\DeanSuite"
> 
>       objNetwork.MapNetworkDrive "O:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Accounting"
> 
>       objNetwork.MapNetworkDrive "U:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Graduate
> Assistantship"
> 
>       objNetwork.MapNetworkDrive "S:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Accounting\FAcS"
> 
>        
> 
>        
> 
>       'Case "MGT Dean's Suite"
> 
>       'objNetwork.MapNetworkDrive "T:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups"
> 
>        
> 
>        
> 
>       Case "MGT Development"
> 
>       objNetwork.MapNetworkDrive "L:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Development"
> 
>       objNetwork.MapNetworkDrive "R:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Communications"
> 
>       objNetwork.MapNetworkDrive "M:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Development\Student
> Share"
> 
>       objNetwork.MapNetworkDrive "N:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\DeanSuite"
> 
>        
> 
>       Case "MGT Development SAs"
> 
>       objNetwork.MapNetworkDrive "M:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Development\Student
> Share"
> 
>        
> 
>       'Case "MGT Event Support"
> 
>       'objNetwork.MapNetworkDrive "T:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups"
> 
>        
> 
>        
> 
>       Case "MGT Eview Users"
> 
>       objNetwork.MapNetworkDrive "T:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\eview"
> 
>        
> 
>        
> 
>       Case "MGT Executive Masters"
> 
>       objNetwork.MapNetworkDrive "I:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Executive Education"
> 
>       objNetwork.MapNetworkDrive "J:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\EMSMOT_Act"
> 
>       objNetwork.MapNetworkDrive "K:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\EMSMOT"
> 
>       objNetwork.MapNetworkDrive "O:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Accounting"
> 
>       objNetwork.MapNetworkDrive "L:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Executive Programs"
> 
>        
> 
>       Case "MGT Executive Programs"
> 
>       objNetwork.MapNetworkDrive "I:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Executive Education"
> 
>       objNetwork.MapNetworkDrive "J:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\EMSMOT_Act"
> 
>       objNetwork.MapNetworkDrive "K:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\EMSMOT"
> 
>       objNetwork.MapNetworkDrive "O:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Accounting"
> 
>       objNetwork.MapNetworkDrive "L:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Executive Programs"
> 
>        
> 
>       Case "MGT Explab Share participants"
> 
>       'objNetwork.MapNetworkDrive "L:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Explab"
> 
>       objNetwork.MapNetworkDrive "Z:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\ExpLab"
> 
>        
> 
>        
> 
>       'Case "MGT FACS Admin Assistant List F access"
> 
>       'objNetwork.MapNetworkDrive "T:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups"
> 
>        
> 
>        
> 
>       'Case "MGT FACS Admin Assistant read access"
> 
>       'objNetwork.MapNetworkDrive "T:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups"
> 
>        
> 
>        
> 
>       'Case "MGT FACS Admin Assistant read write access"
> 
>       'objNetwork.MapNetworkDrive "T:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups"
> 
>        
> 
>        
> 
>       'Case "MGT Faculty"
> 
>       'objNetwork.MapNetworkDrive "T:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups"
> 
>        
> 
>       'Case "MGT Staff FaCs access"
> 
>       'objNetwork.MapNetworkDrive "T:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups"
> 
>        
> 
>        
> 
>        
> 
>       Case "MGT Graduate Office"
> 
>       objNetwork.MapNetworkDrive "M:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Graduate Office"
> 
>        
> 
>       Case "MGT Grad Assistant Share"
> 
>       objNetwork.MapNetworkDrive "U:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Graduate
> Assistantship"
> 
>        
> 
>       Case "MGT HR staff"
> 
>       objNetwork.MapNetworkDrive "X:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Building Operations"
> 
>       objNetwork.MapNetworkDrive "N:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\DeanSuite"
> 
>       objNetwork.MapNetworkDrive "O:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Accounting"
> 
>       objNetwork.MapNetworkDrive "Y:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Communications"
> 
>       objNetwork.MapNetworkDrive "R:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Human Resources"
> 
>       objNetwork.MapNetworkDrive "Q:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Accounting\Pcard"
> 
>        
> 
>        
> 
>       Case "ILE Office"
> 
>       objNetwork.MapNetworkDrive "J:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Institute for LE"
> 
>        
> 
>       Case "ILE GRAs"
> 
>       objNetwork.MapNetworkDrive "J:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Institute for LE"
> 
>        
> 
>       Case "MGT Tiger Share participants"
> 
>       objNetwork.MapNetworkDrive "T:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Tiger"
> 
>        
> 
>        
> 
>       Case "MGT Undergraduate Office"
> 
>       objNetwork.MapNetworkDrive "M:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Undergraduate
> Office"
> 
>        
> 
>        
> 
>       Case "MGT Recruiting Share Access"
> 
>       objNetwork.MapNetworkDrive "Q:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Recruiting"
> 
>        
> 
>       Case "MGT Faculty"
> 
>       objNetwork.MapNetworkDrive "S:",
> "\\mgt-fileshare.mgt.myschool.com\com\shares\groups\Accounting\FAcS"
> 
>        
> 
>        
> 
>        
> 
>       End Select
> 
>       Next
> 
>        
> 
>       Booker T. Washington III
> 
>       Systems Support Specialist
> 
> ________________________________
> 
> Confidentiality Warning: This message and any attachments are intended
> only for the use of the intended recipient(s), are confidential, and may
> be privileged. If you are not the intended recipient, you are hereby
> notified that any review, retransmission, conversion to hard copy,
> copying, circulation or other use of all or any portion of this message
> and any attachments is strictly prohibited. If you are not the intended
> recipient, please notify the sender immediately by return e-mail, and
> delete this message and any attachments from your system. 
> 
> 

***********************
You can unsubscribe from gptalk by sending email to 
gptalk-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field OR by 
logging into the freelists.org Web interface. Archives for the list are 
available at //www.freelists.org/archives/gptalk/
************************

Other related posts: