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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon Script

Status
Not open for further replies.

Helfenmir

MIS
Sep 17, 2001
61
GB
Hi

Can anybody help me with why the followin logon statement dows not work. Running NT 4.0 Servers and W2K workstations.


When using the following ifmember statement, everybody seems to be running the net use command irrespective of whether they are in the group or not.

ifmember of "\\DOMAIN\Group"
If ERRORLEVEL GOTO END
net use blah blah blah

:END
Any Help Please
Thanks
Helfenmir


 
*Pasted from mcseguide.com* Your syntax is a bit off - try using the following as a guide:

The resource kit has a program called IFMEMBER, which you can use in your login script logic. IFMEMBER works by checking for membership in a group and returning an ERRORLEVEL hence you'll have a bunch of IF THENS. Codesegment section:

:its
ifmember itsgrp
if not errorlevel 1 goto hrgrp
net use u: \\server1\itsshare$

:hrgrp
ifmember hrgrp
if not errorlevel 1 goto secgrp
net use u: \\server1\secshare$ Marc Creviere
 
Thanks very much I'll give it try. What I had has worked before in a NT 4.0 environment though.

Many Thanks
Helfenmir
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top