Solved

logon script to automatically map printer based on group membership

Posted on 2004-08-20
8
1,145 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

The HP utility "HP Lights-Out Online Configuration Utility for Windows Server 2003/2008" could be of great use when it comes to remotely configure a HP servers ILO WITHOUT rebooting the server. We would only need to create and run scripts using thi…
I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

746 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

11 Experts available now in Live!

Get 1:1 Help Now