Solved

Batch file to add network printer

Posted on 2011-02-15
8
1,562 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
8 Comments
 
LVL 5

Expert Comment

by:Noduzz
Comment Utility
0
 

Author Comment

by:cgooden01
Comment Utility
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 84 total points
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 7

Assisted Solution

by:TechnoChat
TechnoChat earned 83 total points
Comment Utility
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 83 total points
Comment Utility
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:Herman D'Hondt
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Printers have changed substantially in the last 30 or so years, not just in technical capabilities but in cost and usage as well.  Printers were originally used for interfacing with the operator, not necessarily for printing copy or pictures. In …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now