Kix95(리소스 킷의)와 같은 로그인 스크립트 프로세서를 구현할 준비가 되지 않았다면, 스크립트에 간단히 실행파일만 사용할 수도 있다. ifmember(역시 리소스 킷의)로 사용자는 하나 또는 그 이상의 그룹 메버쉽을 시험할 수 있다. 여기에 예가 있다.
\SERVER\NETLOGON\ifmember "Accountants" "Accounts Payable"
REM 0=none, 1=one of the groups, 2 =two of the listed groups
if ERRORLEVEL 1 goto apac%errorlevel%
:sales
\SERVER\NETLOGON\ifmember "Sales"
If NOT ERRORLEVEL 1 goto common
net use s: \ServerName\Sales$ /persistent:no
goto common
:apac1
REM Either a member of Accountants or Accounts Payable
\SERVER\NETLOGON\ifmember "Accountants"
if ERRORLEVEL 1 goto acct
net use x: \ServerName\ap$ /persistent:no
goto sales
:acct
net use y: \ServerName\acct$ /persistent:no
goto sales
:apac2
REM Membership in both Accountants and A/P
net use x: \ServerName\ap$ /persistent:no
net use z: \ServerName\accctap$ /persistent:no
goto acct
:common
net use h: /home
exit
댓글: