Our company has grown significantly recently and adding printers seperatly for each user is getting painful. Is there a way to add network printers automatically? Maybe through a login script or Group Policy? We have all Win XP SP2 machines and Win 2k SP4 servers.
Thank you
- Follow via:
- RSS
- Email Alert
Question
0
Votes
Answers (2)
0
Votes
Yes.
Map it directly
'Map printers
AddPrinterConnection "\\PrintServer\PrinterShareName"
or based on a group membership
If IsAMemberOf(objNetwork.UserDomain,objNetwork.UserName,"PrinterUserGroup") Then AddPrinterConnection "\\PrintServer\PrinterShareName"
By creating security groups for the different printers you can addthe users of the individual printers to the security group associated with the printer. They only get mapped to the printers they require.
This can be done in Group Policies and apparently can be based on computer name as well if done that way. I have not used group policies for this.
If your clients don't process vbs script you could use "net use" commands to map the printers instead.
Note: If you find this answer usefull, please mark it as helpful.
It's the only tangible reward our self-indulgent egos get for answering questions here.?
'Map printers
AddPrinterConnection "\\PrintServer\PrinterShareName"
or based on a group membership
If IsAMemberOf(objNetwork.UserDomain,objNetwork.UserName,"PrinterUserGroup") Then AddPrinterConnection "\\PrintServer\PrinterShareName"
By creating security groups for the different printers you can addthe users of the individual printers to the security group associated with the printer. They only get mapped to the printers they require.
This can be done in Group Policies and apparently can be based on computer name as well if done that way. I have not used group policies for this.
If your clients don't process vbs script you could use "net use" commands to map the printers instead.
Note: If you find this answer usefull, please mark it as helpful.
It's the only tangible reward our self-indulgent egos get for answering questions here.?
16th Oct 2008
Replies
if you have any samle script, so i will use it in all users logon path,
or
any batch file ??
or
any batch file ??
swapnilnaik123@...
18th Oct 2008
'Map printers
AddPrinterConnection "\\PrintServer\PrinterShareName"
If IsAMemberOf(objNetwork.UserDomain,objNetwork.UserName,"PrinterUserGroup") Then AddPrinterConnection "\\PrintServer\PrinterShareName"
Both of the above are based on my working logon scripts. I simply changed the server name and printer sharename to generic terms.
I have a main logon script for all users on the domain. The "If IsAMemberOf" is part of that. I have created security groups to associate with the different printers and simply add users to the related printer security group of whatever printer they are physically close to.
This is used in the logon script stored at \\DomainServer\netlogon\. (Any script stored here will be replicated to all of your domain controllers automatically)
The "AddPrinterConnection "\\PrintServer\PrinterShareName" " statement is one I use for a local script. I use it for shared computers that are used by many users under different logons. By using a local startup script I can re-create the drive mapping to the printer next to the computer for any user that logs on to the shared computer. Other wise each user would have to "Add" the printer under the local profile that is created the first time they log on to tha particular workstation.
I simply save it to the C:\Documents and Settings\All Users\Start Menu\Programs\Startup folder.
A .vbs logon script is simpley a text file with a .vbs extension instead of a .txt. Just like a batch file is a text file with a .bat extension.
AddPrinterConnection "\\PrintServer\PrinterShareName"
If IsAMemberOf(objNetwork.UserDomain,objNetwork.UserName,"PrinterUserGroup") Then AddPrinterConnection "\\PrintServer\PrinterShareName"
Both of the above are based on my working logon scripts. I simply changed the server name and printer sharename to generic terms.
I have a main logon script for all users on the domain. The "If IsAMemberOf" is part of that. I have created security groups to associate with the different printers and simply add users to the related printer security group of whatever printer they are physically close to.
This is used in the logon script stored at \\DomainServer\netlogon\. (Any script stored here will be replicated to all of your domain controllers automatically)
The "AddPrinterConnection "\\PrintServer\PrinterShareName" " statement is one I use for a local script. I use it for shared computers that are used by many users under different logons. By using a local startup script I can re-create the drive mapping to the printer next to the computer for any user that logs on to the shared computer. Other wise each user would have to "Add" the printer under the local profile that is created the first time they log on to tha particular workstation.
I simply save it to the C:\Documents and Settings\All Users\Start Menu\Programs\Startup folder.
A .vbs logon script is simpley a text file with a .vbs extension instead of a .txt. Just like a batch file is a text file with a .bat extension.
1bn0
19th Oct 2008
0
Votes
Installing a shared network printer...
Installing a shared network printer in an automated fashion on Windows XP & Vista client workstations
The method below relies on a little known VBSCRIPT file provided by Microsoft from Windows XP onwards : PRNMNGR.VBS. This VBSCRIPT file allows you to install a network printer onto a PC using a single command line. So, for Windows XP client PCs/workstations ?.
- On your server install and set up the printer to be networked.
- Share the printer. Let?s assume the name of your server is SERVERW2K and that you name its share TopFloor-ColorLaserJet-3700DN.
- Next, to ensure that the printer is automatically installed into a user?s profile when he/she logs on, simply enter the following line in a batch file that gets run by the Logon Script setting of the Group Policy that applies to the user in question :
CSCRIPT %windir%system32prnmngr.vbs -ac -p ?\ServerW2KTopFloor-ColorLaserJet-3700DN?
The simple line above will add the specified printer into that user?s profile if it does not exist.
More here:
http://tinyurl.com/6p9tjt
Please post back if you have any more problems or questions.
If this information is useful, please mark as helpful. Thanks.
The method below relies on a little known VBSCRIPT file provided by Microsoft from Windows XP onwards : PRNMNGR.VBS. This VBSCRIPT file allows you to install a network printer onto a PC using a single command line. So, for Windows XP client PCs/workstations ?.
- On your server install and set up the printer to be networked.
- Share the printer. Let?s assume the name of your server is SERVERW2K and that you name its share TopFloor-ColorLaserJet-3700DN.
- Next, to ensure that the printer is automatically installed into a user?s profile when he/she logs on, simply enter the following line in a batch file that gets run by the Logon Script setting of the Group Policy that applies to the user in question :
CSCRIPT %windir%system32prnmngr.vbs -ac -p ?\ServerW2KTopFloor-ColorLaserJet-3700DN?
The simple line above will add the specified printer into that user?s profile if it does not exist.
More here:
http://tinyurl.com/6p9tjt
Please post back if you have any more problems or questions.
If this information is useful, please mark as helpful. Thanks.
Updated - 19th Oct 2008

































