[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Batch file to add network printer

Posted on 2011-02-15
8
Medium Priority
?
1,602 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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
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 39

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction During my participation as a VBScript contributor at Experts Exchange, one of the most common questions I come across is this: "I have a script that runs against only one computer. How can I make it run against a list of computers in …
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
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…
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, …
Suggested Courses

656 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