Solved

logon script to automatically map printer based on group membership

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

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
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…

617 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