- Posts: 783
- Thank you received: 0
Scripted TCP/IP printer installation
- skepticals
- Topic Author
- Offline
- Elite Member
Less
More
16 years 9 months ago #25220
by skepticals
Scripted TCP/IP printer installation was created by skepticals
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?
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?
16 years 8 months ago #25225
by jtartist
Replied by jtartist on topic Re: Scripted TCP/IP printer installation
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
JT
16 years 8 months ago #25228
by SteveP
Replied by SteveP on topic Re: Scripted TCP/IP printer installation
@jtartist: An example would be very useful. I'm collecting useful "snippets" and I think that this is a candidate for my file!
16 years 8 months ago #25235
by jtartist
Replied by jtartist on topic Re: Scripted TCP/IP printer installation
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
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
Time to create page: 0.159 seconds