penguinroundup
MIS
I am trying to get this ^!&@$# login script to work properly from my SYSVOL share, but I keep getting the error message "ifmember is not recognized as an internal or external command, operable program or batch file" - then the script maps ALL the drives, and does not check group membership. I have the ifmember.exe file in my SYSVOL share along with the script. If I run the batch file locally (i.e. from the hard drive), it works perfectly. Here is a snippet of my batch file:
**a bunch of net use /deletes are here, removed to save space} the regular mappings below work fine**
net use p: \\mydc1\public /y %switch%
net use s: \\mydc1\apps /y %switch%
net use m: \\myserver\mp /Y %SWITCH%
NET USE I: \\mydc1\EXHIBIT /Y %SWITCH%
NET USE Y: \\mydc1\CALENDAR /Y %SWITCH%
ifmember mydomain\IT
if not errorlevel 1 goto next1
net use Q: \\mydc2\IT
:next1
ifmember "mydomain\Corporate Data"
if not errorlevel 1 goto next2
net use t: \\mydc1\Data
:next2
ifmember mydomain\Signature
if not errorlevel 1 goto next3
net use X: \\mydc1\Signature
:next3
ifmember mydomain\DnD
if not errorlevel 1 goto next4
net use o: \\mydc2\D&D
**there's a bunch of these, I only included a few. I have tried specifying the UNC path to the ifmember executable file (\\mydc1\sysvol\ifmember.exe mydomain\IT...), but that didn't help. I'm SO close to getting this to work, what am I doing wrong???
thanks in advance for any help.
**a bunch of net use /deletes are here, removed to save space} the regular mappings below work fine**
net use p: \\mydc1\public /y %switch%
net use s: \\mydc1\apps /y %switch%
net use m: \\myserver\mp /Y %SWITCH%
NET USE I: \\mydc1\EXHIBIT /Y %SWITCH%
NET USE Y: \\mydc1\CALENDAR /Y %SWITCH%
ifmember mydomain\IT
if not errorlevel 1 goto next1
net use Q: \\mydc2\IT
:next1
ifmember "mydomain\Corporate Data"
if not errorlevel 1 goto next2
net use t: \\mydc1\Data
:next2
ifmember mydomain\Signature
if not errorlevel 1 goto next3
net use X: \\mydc1\Signature
:next3
ifmember mydomain\DnD
if not errorlevel 1 goto next4
net use o: \\mydc2\D&D
**there's a bunch of these, I only included a few. I have tried specifying the UNC path to the ifmember executable file (\\mydc1\sysvol\ifmember.exe mydomain\IT...), but that didn't help. I'm SO close to getting this to work, what am I doing wrong???
thanks in advance for any help.