Solved

LOGON VB SCRIPT or any type of script

Posted on 2003-11-06
5
155 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 84

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

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Remote Desktop Software 6 468
Outlook 2013 Certicate error 1 307
Change port for terminal servers (2000 and 2003) 3 176
Get process CPU use Win2000 server in visual basic 12 162
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…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

751 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