Solved

logon script to automatically map printer based on group membership

Posted on 2004-08-20
8
1,148 Views
Last Modified: 2011-10-03
I set my AD as follow:

Users are put into global groups according to department.

Domain local group are create as a mean to provide access to printer.

Global groups are put into Domain local group in order to use the printers.

Now... any log on script that would some how map all the printers that is available to a user based on their group membership?
0
Comment
Question by:SC2002Admin
8 Comments
 
LVL 2

Accepted Solution

by:
TASINetwork earned 168 total points
ID: 11851727
Here's how I do it:

Get Kix32 from www.kixstart.org.  You can use this program to map drives, etc. for different groups.

Create a .vbs file with the following code and put it in your NETLOGON dir:
-----------begin vbs file--------------------------
Set objWSHNetwork = CreateObject("WScript.Network")  'create network object
strConnectString = "\\server\printer"
strResult = objWSHNetwork.AddWindowsPrinterConnection(strConnectString)
------------end vbs file---------------------------

Now, reference the vbs file in the appropriate group section of your Kix logon script.
0
 
LVL 83

Assisted Solution

by:oBdA
oBdA earned 166 total points
ID: 11851729
You can use con2prt.exe (ZAK) and ifmember.exe (Resource Kit) to map the map the corresponding printer in the logon script. Simply put the .exes into the netlogon share.
Here's a sample script:

====8<----[logon.cmd]----
:: *** Delete all mapped printers:
con2prt.exe /f
:: *** Map the printers according to group membership:
ifmember.exe %UserDomain%\Printer01Group
if not errorlevel 1 goto EndPrinter01Group
con2prt.exe /c \\PrintServer\Printer01
:EndPrinter01Group

ifmember.exe %UserDomain%\Printer02Group
if not errorlevel 1 goto EndPrinter02Group
con2prt.exe /c \\PrintServer\Printer02
:EndPrinter02Group
====8<----[logon.cmd]----

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

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

Resource Kits Free Tool Downloads: Ifmember.exe
http://www.microsoft.com/windows2000/techinfo/reskit/tools/new/ifmember-o.asp
0
 

Author Comment

by:SC2002Admin
ID: 11862091
Is it possible to use just a vbs script without adding any extra script processor or executables?
0
 

Author Comment

by:SC2002Admin
ID: 11901269
Is there anything easier than that , something that would just map all available printers the user have rights to based on Group membership?
0
 
LVL 1

Assisted Solution

by:dspent
dspent earned 166 total points
ID: 12058616
try a program called Desktop Authority 6 available at www.scriptlogic.com.  It ain't free but it is well worth the cost.  They have a 45 day trial.
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

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

920 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

14 Experts available now in Live!

Get 1:1 Help Now