?
Solved

Batch file to add network printer

Posted on 2011-02-15
8
Medium Priority
?
1,594 Views
Last Modified: 2012-05-11
I used to have this batch file some time ago, but cannot find it anymore.  Unfortunately, i'm not working in the capacity as an an Enterprise Admin so i can not invoke GPO, this organization does not currently have a print Server or any server working in that capacity. So i would like to use a batch file and remotely place this under the all user Desktop so each user can simply click and install the appropriate printer within the batch file.  Any help on this would be greatly appreciated. OS: Vista and XP SPII
0
Comment
Question by:cgooden01
[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 5

Expert Comment

by:Noduzz
ID: 34901775
0
 

Author Comment

by:cgooden01
ID: 34901989
Thanks but i need you to be more explicit...I have already search the net quite abit on here and have found possible solutions.  Either by the use of what you sent to me via hyperlink and the such.  Reminder, we are not running a print server and this need to be able for the user with non admin rights to add the printer by its Host name instead of the IP which is dynamic.  
0
 

Accepted Solution

by:
gosfordit_support earned 336 total points
ID: 34902159
Hi CGOODEN01,

There are a few simple ways this can be done.
If the printer needs to be setup locally on a machine you can use the following within a command prompt:

net use LPT1 \\MyServer\MyPrinter

Where MyServer is the name of the computer that the printer is shared off of and MyPrinter is the windows share name of the printer you need installed.

Alternatively.

You can add a printer that is shared off of a machine via the following command:

rundll32 printui.dll,PrintUIEntry /il /c\\machine

Where 'machine' is the machine that the printer is shared off.

Hope this helps.
Nick
0
Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

 
LVL 7

Assisted Solution

by:TechnoChat
TechnoChat earned 332 total points
ID: 34923549
Try this attached script..
Hope it will help you out.
@echo off
set printer=\\SERVER\PRINTER
::ADDING PRINTER
rundll32 printui.dll,PrintUIEntry /in /q /n "%printer%"
::SET DEFAULT
rundll32 printui.dll,PrintUIEntry /y /n "%printer%"
exit

Open in new window

0
 
LVL 3

Assisted Solution

by:sam0x01
sam0x01 earned 332 total points
ID: 34991367
If you run a print server at all you could just run
\\serverhost\printshare

Open in new window


to map a single printer.

I suspect you could easily add this to a login script if you have access to this.
0
 
LVL 38

Expert Comment

by:hdhondt
ID: 35304420
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

752 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