It might be better to e.g. put all your mappings into a .INI file and have just one sections that processes all mappings at once. Example:code:
; Mandatory drive shares for users
;
; Format:
;
;[UNC]
;Drive = drive letter to which the UNC name will be mapped, '*' is valid
;GroupInclude = User groups to be included in the drive share
;CompExclude = Computers to be excluded from the drive share (overrides GroupInclude)
;UserInclude = Users to be included in the drive share (overrides CompExclude)
;NetworkType = Type of network connection allowed for this share (LOCAL, LAN, VPN, DIALUP)
;Persistent = True if mapping is persistent
;DenyGuestAccess = True if guests are not allowed to access this share
[\\server\share]
Drive=L
GroupInclude=Domain Users, Domain Admins
CompExclude=JUKEBOX, LAPTOP1, WORKSTATION1
NetworkType=LOCAL, LAN, VPN, DIALUP
Persistent=1
_________________________
There are two types of vessels, submarines and targets.