Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

logon script to automatically map printer based on group membership

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

by Batuhan Cetin In this article I will be guiding through the process of removing a failed DC metadata from Active Directory (hereafter, AD) using the ntdsutil tool in a Windows Server 2003 environment. These steps are not necessary in a Win…
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 response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

972 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