Hot Downloads

Welcome, Guest
Username: Password: Remember me

TOPIC: Scripted TCP/IP printer installation

Scripted TCP/IP printer installation 8 years 9 months ago #25220

  • skepticals
  • skepticals's Avatar
  • Offline
  • Expert Member
  • Posts: 783
  • Karma: 0
Is there a way to script the installation of a local TCP/IP printer? One that doesn't use a print server.

I would need the script to configure the printer settings too. IE, default Black and White, paper size, etc.

Is this possible? Are these settings stored in the Windows registry and can be exported?

Thoughts?
The administrator has disabled public write access.

Re: Scripted TCP/IP printer installation 8 years 9 months ago #25225

  • jtartist
  • jtartist's Avatar
  • Offline
  • Frequent Member
  • Posts: 27
  • Karma: 0
I use prnport.vbs to create the port and then printui.dll to install the printer drivers and map the printer to the new port. I'm not sure if you can set the additional features this way though. I can post an example tomorrow if you'd like.

JT
The administrator has disabled public write access.

Re: Scripted TCP/IP printer installation 8 years 9 months ago #25228

  • SteveP
  • SteveP's Avatar
  • Offline
  • Distinguished Member
  • Posts: 161
  • Karma: 0
@jtartist: An example would be very useful. I'm collecting useful "snippets" and I think that this is a candidate for my file!
The administrator has disabled public write access.

Re: Scripted TCP/IP printer installation 8 years 9 months ago #25235

  • jtartist
  • jtartist's Avatar
  • Offline
  • Frequent Member
  • Posts: 27
  • Karma: 0
1.

cscript c:\windows\system32\prnport.vbs -t -r specifyportname -o raw -n 9100 -h specifyportname


Change these fields:

specifyportname = enter IP address or hostname

specifyportname = enter the same thing again.



2.

rundll32 printui.dll,PrintUIEntry /if /b "EnterPrinterName" /f c:\lj4100\hp4100p6.inf /r "specifyportname" /m "HP LaserJet 4100 PCL 6"



Change these fields:

EnterPrintername = this names the printer (do not remove quotes)


Specifyportname = use same port name specified in step one.



c:\lj4100\hp4100p6.inf = this tells the script where to locate the printer drives. I use Altiris to copy the printer drivers to the local computer "before" I run the script.


"HP LaserJet 4100 PCL 6" = this field is located in the above .inf file, and specifies which printer driver you want to install.


Hopefully it makes sense posted this way. Let me know if you have any Q's.

-JT
The administrator has disabled public write access.

Re: Scripted TCP/IP printer installation 8 years 9 months ago #25236

  • SteveP
  • SteveP's Avatar
  • Offline
  • Distinguished Member
  • Posts: 161
  • Karma: 0
That's great jtartist - I'll have a "play". I'm not familiar with Altiris so I'd better do some googling!
The administrator has disabled public write access.
Time to create page: 0.077 seconds

CCENT/CCNA

Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V

Linux

  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup