Solved

LOGON VB SCRIPT or any type of script

Posted on 2003-11-06
5
159 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 85

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

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…
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

632 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