The script is below. The X drive mapping does not happen when you log in. After logging in, if you run the logging script, it maps the drive.
I checked the share settings and security settings on that share and all seem ok. They have to be since it maps post login.
ON ERROR RESUME NEXT
' Option Explicit
Dim WSHShell, WSHNetwork, DomainString, objDomain, UserString, UserObj, strComputer, WinDir, GroupObj
Dim Ugroup, objDrives, i
Set WSHShell = CreateObject("WScript.Shell")
Set WSHNetwork = CreateObject("WScript.Network")
Set objDomain = getObject("LDAP://rootDse")
Set objDrives = WSHNetwork.EnumNetworkDrives
DomainString = objDomain.Get("dnsHostName")
'Find the Windows Directory
WinDir = WshShell.ExpandEnvironmentStrings("%WinDir%")
'Grab the user name
UserString = WSHNetwork.UserName
'Bind to the user object to get user name and check for group memberships later
Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)
'Grab the computer name for use in add-on code later
strComputer = WSHNetwork.ComputerName
' Install All Printers
WSHNetwork.AddWindowsPrinterConnection "\\bps-dc\Canon iR7095"
WSHNetwork.AddWindowsPrinterConnection "\\bps_mm_srv1\Canon iR5000-PCL"
WSHNetwork.AddWindowsPrinterConnection "\\bps_mm_srv1\HP LaserJet 4200 PCL 6 (Barb)"
For Each GroupObj In UserObj.Groups
Select Case UCase(GroupObj.Name)
Case "BPS"
WSHNetwork.AddWindowsPrinterConnection "\\bps_mm_srv1\HP LaserJet 5Si"
WSHNetwork.AddWindowsPrinterConnection "\\bps_mm_srv1\BPSACCT"
DriveMapper "I:", "\\bps-nas\Company Software"
DriveMapper"Q:", "\\BPS_MM_srv3\apps"
DriveMapper"V:", "\\bps_mm_srv3\BPSData"
Case "M&M"
WSHNetwork.AddWindowsPrinterConnection "\\bps_mm_srv1\HP Color LaserJet 8550 PCL 5C"
WSHNetwork.AddWindowsPrinterConnection "\\bps_mm_srv1\HP LaserJet 4100 Series PCL"
WSHNetwork.AddWindowsPrinterConnection "\\bps_mm_srv1\HP LaserJet 9000 PCL 6"
DriveMapper"X:", "\\MM-PFX\Pacs"
DriveMapper"W:", "\\BPS_MM_srv3\MMData"
DriveMapper"I:", "\\bps-nas\Company Software"
DriveMapper"P:", "\\BPS_MM_srv5\tax"
DriveMapper"Q:", "\\BPS_MM_srv3\apps"
DriveMapper"T:", "\\BPS_MM_srv3\appdata"
End Select
Next
Sub DriveMapper(Drive, Share)
For i = 0 to objDrives.Count - 1
'Wscript.Echo Drive
'Wscript.Echo Mapped
IF objDrives.Item(i) = Drive THEN WSHNetwork.RemoveNetworkDrive Drive, TRUE, TRUE
NEXT
WSHNetwork.MapNetworkDrive Drive, Share, true
End Sub
WSHNetwork.MapNetworkDrive "X:", "\\MM-PFX\Pacs", true
'Clean Up Memory We Used
set UserObj = Nothing
set GroupObj = Nothing
set WSHNetwork = Nothing
set DomainString = Nothing
set WSHSHell = Nothing
Set objDomain = Nothing
Set UserString = Nothing
Set strComputer = Nothing
Set UGroup = Nothing
Set objDrives = Nothing
Set i = Nothing
WScript.Quit