Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

logon script to automatically map printer based on group membership

Posted on 2004-08-20
8
Medium Priority
?
1,156 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 672 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 664 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 664 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

670 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