Windows NT Logon scripts - performing operations depending on user group membership

  • Section(s): Logon, Network
  • Published on Apr 20, 2004.
  • Last Modified on Apr 20, 2004.
  • Last Modified by Wayne Maples.
  • Rated 1 out of 5 based on 1 votes.
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. Code segment 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$
...

Unfortunately, I believe ifmember only works for NT workstations.

Check out John Kozubik's tutorial Windows NT Login Script Tricks and Tips for tips on NT login scripting.

Microsoft has introduced the downloadable Windows script for vbscript scripting purposes.

About Wayne Maples

Share this article


Article not looking right or info is missing? Let us know so that we can fix it: .


Receive all the latest articles by email!

Receive Real-Time & Monthly WindowsNetworking.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowsNetworking.com member!

Discuss your network issues with thousands of other network administrators. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred Network Inventory solution?