D
Dan
Anyone know why I couldn't do something like this in my
(.bat) logon script? I'm seeing what appears to be the
net use /delete command not finishing before the next
command begins. I'm doing this in case a user is a
member of both of the groups so as to avoid a conflict of
the same drive letter attempting to be mapped twice and
producing an error.
:sales
@echo off
ifmember "salesuser"
if not errorlevel 1 goto ops
echo Connecting to Sales Share...
net use /delete q:
net use q: \\server\sales
ps
@echo off
ifmember "opsuser"
if not errorlevel 1 goto HR
echo Connecting to Ops Share...
net use /delete q:
net use q: \\server\ops
So in a nutshell, if a user is a member of both groups I
don't want any errors to pop up (specifically, taking out
the net use /delete q: command will hang the script and
error with System error 85 which means the drive letter
is already taken). This only occurs if the user is a
member of both groups. Can I get around this any other
way?
Thanks,
Dan
(.bat) logon script? I'm seeing what appears to be the
net use /delete command not finishing before the next
command begins. I'm doing this in case a user is a
member of both of the groups so as to avoid a conflict of
the same drive letter attempting to be mapped twice and
producing an error.
:sales
@echo off
ifmember "salesuser"
if not errorlevel 1 goto ops
echo Connecting to Sales Share...
net use /delete q:
net use q: \\server\sales
![Blush :o :o](/styles/default/custom/smilies/blush.gif)
@echo off
ifmember "opsuser"
if not errorlevel 1 goto HR
echo Connecting to Ops Share...
net use /delete q:
net use q: \\server\ops
So in a nutshell, if a user is a member of both groups I
don't want any errors to pop up (specifically, taking out
the net use /delete q: command will hang the script and
error with System error 85 which means the drive letter
is already taken). This only occurs if the user is a
member of both groups. Can I get around this any other
way?
Thanks,
Dan