I'm trying to write a script that maps users to custom drive mappings (mapping not assigned in AD) and pull drives from AD. As of now I can achieve my goal but the problem is when a user doesn't have a custom drive mapping, I cannot call my other script that calls for the AD mappings. Do I need an ELSE statement that continues the USERNAME into the MYBYGROUP. Example below:
REM: Remove local Drives
net use * /d /y
:: Reconnect Universal drives
net use M: USERDRIVE
net use Y: COMMONDRIVE
SET USERDIR=%username%
GOTO %USERDIR%
:USERNAME
net use F: CUSTOMDRIVE
GOTO MAPBYGROUP
:MAPBYGROUP
wscript %0\..\logon.vbs
Exit