Give this a try and let us know.


Dim $REGkey,$Update
$REGkey='HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'
$Update=WriteValue($REGkey,'HideFileExt','00000000',REG_DWORD)
If @ERROR 'Error updating registry: ' + @ERROR + ' ' + @SERROR ? EndIf

If InGroup(@Domain+'\'+'urfcu-tech')
USE T: /DELETE /PERSISTENT
USE T: '\\fileserv\dept\tech$' /PERSISTENT
If @ERROR 'Error mapping T drive: ' + @ERROR + ' ' + @SERROR ? EndIf
;if you're going to map each logon then no need for the /PERSISTENT switch
If AddPrinterConnection ('\\unity\brotherh') = 0
'Added printer connection....' ?
Else
'Error adding printer UNITY\Brotherh ' + @ERROR + ' ' + @SERROR ?
EndIf
If SetDefaultPrinter('\\unity\brotherh') = 0
'Set default printer to \\unity\brotherh' ?
Else
'Error setting default printer to UNITY\Brotherh: ' + @ERROR + ' ' + @SERROR ?
Endif
EndIf

If InGroup(@Domain+'\'+'urfcu-cs')
USE S: /DELETE /PERSISTENT
USE S: '\\fileserv\cardsource' /PERSISTENT
If @ERROR 'Error mapping S drive: ' + @ERROR + ' ' + @SERROR ? EndIf
EndIf

If InGroup(@Domain+'\'+'Domain Users')
USE P: /DELETE /PERSISTENT
USE P: '\\fileserv\apps\apps' /PERSISTENT
If @ERROR 'Error mapping P drive: ' + @ERROR + ' ' + @SERROR ? EndIf
EndIf