Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ifmember.exe works locally, but not from network

Status
Not open for further replies.
Jul 3, 2001
215
US
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.

 
I stopped using ifmember about nbillion years ago, I found kix, it does it much better. None of these goto rubbish.[smile]

Worth a look anyway, as it is free.

[blue]Arguably the best cat skinner around ! [/blue]

Cheers
Scott
 
When you run it locally which machine are you running it on? The only way I got this to work was to copy ifmember.exe to the local windows\system32 folder by having the following line at the start of the logon script.

copy %logonserver%\sysvol\ifmember.exe %systemroot%\system32

-------------------------------

If it doesn't leak oil it must be empty!!
 
problem with that is, our users don't have rights to copy files to their systems.

ascotta, I created a kixtart script, but I need to call an executable that audits the local machine hw & sw. I tried RUN <path to executable>, but all that does is display the filepath in the command line. how do I do that?

thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top