Solved

LOGON VB SCRIPT or any type of script

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
Owning a franchise can be the dream of a lifetime. It provides a chance for economic growth. You can be as successful as you want.  To make your franchise successful, you need to market it successfully. Here are six of the best marketing strategies …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 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

21 Experts available now in Live!

Get 1:1 Help Now