Petri.co.il forums Home Forums Start Page Forums Frequently Asked Questions FAQ Member List Members List
Go Back   Petri IT Knowledgebase Forums > Windows Scripting > DOS Command Shell
Petri.co.il is happy to award RicklesP the title of Most Valuable Member !!!
Register Calendar Calendar Search Petri IT Knowledgebase Forums Search Todays Posts Today's Posts Mark Forums Read
Notices

Script for installing Network Printers

Script for installing Network Printers

this thread has 8 replies and has been viewed 14590 times

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 27th April 2011, 20:32
ArmyITGuy ArmyITGuy is offline
Casual
Casual
 
 Join Date: Apr 2011
  6 month star 12 month star
 Posts: 4
 Reputation: ArmyITGuy is on a distinguished road (10)
Default Script for installing Network Printers

I am currently trying to write a script that will "simplify" installing printers for our level 1 support. We have 3 common printers that I've used the Pnputil.exe to install the drivers in /driverstor and i am trying to make use of the rundll32 printui feature.. The printers are connecting directly to the LAN and the only switch i see that could do this is the /in. The issue is I cant find any examples for doing this with an IP address. I get an error saying the driver is not found yet I have verified they have been installed in the DRIVERSTOR since this works when I add the printer via the wizard.

Any help would be appreciated.
  #2  
Old 27th April 2011, 20:55
beddo beddo is offline
Member
Here to help
 
 Join Date: May 2009
  6 month star 12 month star
 Location: North West
 Posts: 316
 Reputation: beddo will become famous soon enough (71)
Default Re: Script for installing Network Printers

It depends on your network. If you've a 2008 server you can use group policy preferences to take the hassle out of it.

On 2003 servers we use Kix Scripts. With this you can install the IP printer to the server (could be any machine really) and then automatically connect the computers up to the shared printer. You can do all sorts of more advanced things and make it user or station aware, or just use it to connect the printer to everyone.
  #3  
Old 27th April 2011, 21:09
ArmyITGuy ArmyITGuy is offline
Casual
Casual
 
 Join Date: Apr 2011
  6 month star 12 month star
 Posts: 4
 Reputation: ArmyITGuy is on a distinguished road (10)
Default Re: Script for installing Network Printers

Unfortunately in our IT world we do not have servers at my level.. All the servers are maintained by the T3 Support. Getting them to setup something like that would be "out of their scope of support." I would have no issue trying to do something like that myself but "any server has to be moved to their location" then I have to submit trouble tickets everytime i need something done ( up to a 5 business day resolve time.)
  #4  
Old 27th April 2011, 21:13
beddo beddo is offline
Member
Here to help
 
 Join Date: May 2009
  6 month star 12 month star
 Location: North West
 Posts: 316
 Reputation: beddo will become famous soon enough (71)
Default Re: Script for installing Network Printers

It doesn't need to be a server. You could have a PC with file/printer sharing on it and just don't tell them

You could put kix on a share on a PC and have them manually run a batch file from the share. Kix is literally an exe and a dll from memory. Alternatively you could put the kix executables onto every PC and have L1 carry the batch file round on the pen drive. You would still need somewhere to share the printers from though.
  #5  
Old 27th April 2011, 21:46
gerth's Avatar
gerth gerth is offline
Junior Member
Staying around
 
 Join Date: Jul 2010
  6 month star 12 month star
 Location: The Netherlands
 Posts: 222
 Reputation: gerth will become famous soon enough (73)
Default Re: Script for installing Network Printers

The following sites might be of help:

http://support.microsoft.com/kb/314486

http://www.robvanderwoude.com/2kprintcontrol.php

Create some batch file, and let the user click on it to install the printer.
__________________
gerth

MCITP sa, ea & va, sysadmin@cydonia.
  #6  
Old 28th April 2011, 12:34
Rems's Avatar
Rems Rems is offline
Moderator
 
 Join Date: Mar 2005
  6 month star 12 month star
 Location: NL
 Posts: 2,431
 Reputation: Rems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to beholdRems is a splendid one to behold (965)
Default Re: Script for installing Network Printers

Quote:
Originally Posted by ArmyITGuy View Post
The printers are connecting directly to the LAN <...>

I've used the Pnputil.exe to install the drivers in /driverstor
Is there a reason for not using a Print Server on the network that shares the printers?
Are all desktop computers member of the domain?


Quote:
Originally Posted by beddo View Post
If you've a 2008 server you can use group policy preferences to take the hassle out of it.
The clients apparently are Vista or Windows 7 machines, so with RSAT on just one of the clients he can use Group Policy Preferences. Still however it requires the printer is shared on the network which, if I understood the question correctly, they are not.


/Rems
__________________

This posting is provided "AS IS" with no warranties, and confers no rights.

__________________

** Remember to give credit where credit's due **
and leave Reputation Points for meaningful posts

Last edited by Rems; 28th April 2011 at 12:57..
  #7  
Old 28th April 2011, 15:24
beddo beddo is offline
Member
Here to help
 
 Join Date: May 2009
  6 month star 12 month star
 Location: North West
 Posts: 316
 Reputation: beddo will become famous soon enough (71)
Default Re: Script for installing Network Printers

Quote:
Originally Posted by Rems View Post
The clients apparently are Vista or Windows 7 machines, so with RSAT on just one of the clients he can use Group Policy Preferences. Still however it requires the printer is shared on the network which, if I understood the question correctly, they are not.
I checked and can't find a reference to what OS the clients are running in the thread.

Agreed that having something sharing the printers makes it a whole lot simpler though.
  #8  
Old 2nd May 2011, 19:48
ArmyITGuy ArmyITGuy is offline
Casual
Casual
 
 Join Date: Apr 2011
  6 month star 12 month star
 Posts: 4
 Reputation: ArmyITGuy is on a distinguished road (10)
Default Re: Script for installing Network Printers

The version of the Os is vista. And yes a print server would be the most practical idea. But we do not have the authority to setup a print server nor access to the servers to use a group policy.

As I appreciate your help in coming up with additional ways to do what I am trying to do, I assure you, I have already thought of them and am not able to do this. This is a DoD network and as beddo suggested, just install it without the higher tiers knowing is not a resolution.

As far as a print server.. an admin still has to connect to the printer the first time for the user to connect. which is why I used pnputil to install the drivers.

After some research on the rundll32 printui.dll,printuientry it seems when installing a network printer and using a tcp/ip port, it does not create this port like it does when using the 'prinrt install wizard.'

So i guess my question is now do you know how to created a tcp/ip port for printers via the command line?
  #9  
Old 2nd May 2011, 23:20
gerth's Avatar
gerth gerth is offline
Junior Member
Staying around
 
 Join Date: Jul 2010
  6 month star 12 month star
 Location: The Netherlands
 Posts: 222
 Reputation: gerth will become famous soon enough (73)
Default Re: Script for installing Network Printers

prnport.vbs can be used to create a port

http://technet.microsoft.com/en-us/l.../bb490975.aspx
__________________
gerth

MCITP sa, ea & va, sysadmin@cydonia.
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Printers on Virtual PC oldcomputerguy Virtual Server & Virtual PC 1 19th August 2009 22:00
Script for installing local printers with TCP/IP port Iznogoud General Scripting 3 11th May 2008 02:19
Installing network printers on WinXP stationts migor78 Misc 4 5th August 2007 23:00
Script to map Printers Zaf General Scripting 3 5th December 2006 01:39
Installing multiple network printers simonsays Windows Server 2000 / 2003 / 2003 R2 8 26th November 2006 15:15


All times are GMT +3. The time now is 11:41.

Steel Blue 3.5.4 vBulletin Style ©2006 vBEnhanced
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
 

Valid XHTML 1.0!   Valid CSS!

Copyright 2005 Daniel Petri