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

Status
Not open for further replies.

wpgITguy

MIS
Mar 25, 2003
9
US
Does anyone know how to use ifmember.exe with NT4? I downloaded it from the Microsoft website. Do I just need to install the program on server or can I place the executable in the import\scripts directory?
 
You place it in the scripts/import folder and in your login script you have defined local or global groups, then if the are a member then they will have access to those shares, IFMEMBER of the the group you have permission to go there.
 
How do I define them in the script? Do I just list them or do I need to use a function in ifmember to define it?
 
I suggested this to "Sunnybyfleet" " NT Logon Scripts and Groups: Give it a try
Remember that IFMEMBER needs to be in the same directory as the scripts
Example Login Script
@echo off

set DUMPFILE=c:\mtplogon.dmp
set GLOBALDRIVE=p:
set GLOBALSHARE=\\sys\directory1
set group1=Accounts

if %OS% == Windows_NT goto winnt >nul

:win

echo Syntax Error is expected if running Windows 3.11, 95 or 98

cls

echo.

echo Welcome to the My Domain. Please wait while your logon is processed...

echo.

echo Removing Previously Used Connections

echo.

if exist x: net use x: /delete >nul
if exist y: net use y: /delete >nul
if exist z: net use z: /delete >nul

echo.

echo Now Adding Network Drives

echo.

if not exist x: net use x: \\sysx\directory2
if not exist y: net use y: \\sysx\forms
if not exist z: net use z: \\sysx\home$

echo.

echo Setting Time with PDC

echo.

echo y | net time \\sysz /SET /Y

echo.

rem Special fix for Windows logon script end bugs
if exist c:\windows\*.* echo . >c:\windows\lmscript.$$$
if exist c:\win95\*.* echo . >c:\windows\lmscript.$$$

rem End of Logon Script
echo --- LOGON SCRIPT END $Revision: 2 $ ---
if not "%DUMPFILE%"=="" net use >%DUMPFILE%
if not "%DUMPFILE%"=="" set >>%DUMPFILE%

goto end

:winnt

echo.

echo Welcome to the MyDomain. Please wait while your logon is processed...

echo.

ifmember QuitLogon
if not errorlevel 1 goto NOGROUPS1
exit

:NOGROUPS1

echo.

echo Removing Previously Used Connections

echo.

if exist x: net use x: /delete >nul
if exist y: net use y: /delete >nul
if exist z: net use z: /delete >nul

echo.

echo Now Adding Network Drives

echo.

if not exist x: net use x: \\sysx\directory2 /persistent:no
if not exist y: net use y: \\sysx\forms /persistent:no
if not exist z: net use z: \\sysx\%username%$ /persistent:no


echo.

rem MAPPING Accounts USERS TO GLOBAL DRIVE
rem WIN9X CLIENTS HAVE TO PASS ON THIS SECTION
if "%GLOBALDRIVE%"=="" goto NOGROUPS
if exist %GLOBALDRIVE%*.* net use %GLOBALDRIVE% /delete
ifmember %GROUP1%
if not errorlevel 1 goto NOGROUPS
echo --- Mapping %GLOBALDRIVE% to %GLOBALSHARE%
net use %GLOBALDRIVE% %GLOBALSHARE% /persistent:no

:NOGROUPS



echo.
echo
set GLOBALDRIVE2=l:
set GLOBALSHARE2=\\sysy\dir3
set group2=Data

echo ....Mapping APL

if "%GLOBALDRIVE2%"=="" goto NOGROUPS2
if exist %GLOBALDRIVE2%*.* net use %GLOBALDRIVE2% /delete
ifmember %GROUP2%
if not errorlevel 1 goto NOGROUPS2
echo --- Mapping %GLOBALDRIVE2% to %GLOBALSHARE2%
net use %GLOBALDRIVE2% %GLOBALSHARE2% /persistent:no
:NOGOURPS2

echo Now Synchronizing Local Time With The Server

echo.

net time \\sysz /set /y

goto end

:end



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top