Solved

LOGON VB SCRIPT or any type of script

Posted on 2003-11-06
5
147 Views
Last Modified: 2010-04-14
I've been looking for a logon scrpt that maps network drives based on domain groups.  Anyone have any ideas?
0
Comment
Question by:twostupiddogs
  • 2
5 Comments
 
LVL 19

Accepted Solution

by:
Dexstar earned 25 total points
ID: 9695289
twostupiddogs:

> I've been looking for a logon scrpt that maps network drives based on domain
> groups.  Anyone have any ideas?

If you're using Active Directory, then this page tells you how to do it.
http://www.winnetmag.com/WindowsSecurity/Article/ArticleID/7459/WindowsSecurity_7459.html
(Read the 4th question down)

or this:
http://www.winnetmag.com/WindowsScripting/Article/ArticleID/4818/4818.html
(See Task #8 : Testing for Group Membership)

If you not using AD, then there is a tool in the NT4 Resource Kit called "IsMember" that you can use in a batch file to conditionally map drives.



Hope that helps,
Dex*
0
 
LVL 83

Assisted Solution

by:oBdA
oBdA earned 25 total points
ID: 9696032
To map drives based on group membership, you can use ifmember.exe from the W2k Resource Kit. If you don't have the Resource Kit, you can download it here: http://www.microsoft.com/windows2000/techinfo/reskit/tools/new/ifmember-o.asp
While I'm at it, another common thing are network printers; if you want to map those automatically, too, have a look at con2prt.exe (from the NT Zero Administration Kit, still working fine in W2k/XP).

Zero Administration Kit
http://www.microsoft.com/ntworkstation/downloads/Recommended/Featured/NTZAK.asp

To map a network printer:
con2prt.exe /c \\PrintServer\PrintShare
("/cd \\printserver\share" to install it as default printer; /f to delete all existing connections)

How to Use Con2prt.exe to Connect to a Network Printer
http://support.microsoft.com/?kbid=181663

A script solution could then, for example, look like this:

====8<----[Logon.cmd sample]----
REM *** ifmember.exe sets errorlevel 1 if the user is member of the group!
ifmember.exe YourDomain\SomeGroup
if not errorlevel 1 goto EndSomeGroup
net use X: \\FileServer\SomeGroupShare
con2prt.exe /c \\PrintServer\SomeGroupPrinter01
:EndSomeGroup
====8<----[Logon.cmd sample]----
0
 
LVL 19

Expert Comment

by:Dexstar
ID: 10044417
@CleanupPing:

Since I first suggested the use of the utility in the NT Reskit, and oBdA gave a good example of how to use it, I suggest an even split.

Dex*
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now