Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

LOGON VB SCRIPT or any type of script

Posted on 2003-11-06
5
Medium Priority
?
165 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 100 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 100 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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…
Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

722 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