Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using ifmember.exe in a batch file

446 views
Skip to first unread message

Henry Villegas

unread,
Jul 27, 2005, 2:45:06 PM7/27/05
to
I am needing help with writting a batch file ultilizing ifmember.exe. I
would like to map drives according to group memberships. I have a group
named Case and I would like to have that mapped to \\servername\sharname.
Here is a sample of what I have:

@echo off
ifmember "Case"
if not errorlevel 1 goto quit
net use l: \\servername\sharename
:quit

This works. The problem is that it will map everybody in the domain. I
would only like to map users in the Case group. Please tell me what I am
doing wrong.

Thanks,

MFelkins

unread,
Jul 27, 2005, 3:19:07 PM7/27/05
to
Shouldn't it be

ifmember "yourdomain\Case" ??

Mike

James Whitlow

unread,
Jul 27, 2005, 3:54:44 PM7/27/05
to
"Henry Villegas" <HenryV...@discussions.microsoft.com> wrote in message
news:DB2199E3-E0A8-4E28...@microsoft.com...

Try something like this:

ifmember "Case" || net use l: \\servername\sharename


Henry Villegas

unread,
Jul 28, 2005, 9:48:02 AM7/28/05
to
Thank you all for replying. I am still not able to make this work. I have
tried several combinations in the login script to try to make this work. I
tried the following combinations:

ifmember "Case" || net use l: \\servername\sharename

ifmember "My DomainName\Case" || net use l: \\servername\sharename

Any other ideas? Thanks.

James Whitlow

unread,
Jul 28, 2005, 10:46:13 AM7/28/05
to
Have you checked to make sure that 'ifmember.exe' is located in the %path%
of the computer it is running on? If you open a command prompt on one of
your computers and simply type "ifmember", what happens?

Where are you running 'ifmember.exe' from? Are you running it from your
local workstation's C: drive or from the %NETLOGON% directory?


"Henry Villegas" <HenryV...@discussions.microsoft.com> wrote in message

news:4F506CF7-BB85-4AA8...@microsoft.com...

boe

unread,
Jul 28, 2005, 11:14:59 PM7/28/05
to
Dooh - I missed this the first time I read through the topics - you and I
are working on the same issue. Hopefully one of us will get the solution.
"James Whitlow" <jwhi...@letter.com> wrote in message
news:e62KbM4k...@TK2MSFTNGP12.phx.gbl...
0 new messages