Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Setting up network printer in Windows 7

21 Feb 2010   #1

Windows 7
 
 
Setting up network printer in Windows 7

I'm trying to setup a network printer in Windows 7 from command line. I've tried using the rundll32 printui.dll command. It works in Windows XP. But pops up with an error "The specified port is unknown" in Windows 7.


My System SpecsSystem Spec
.

21 Feb 2010   #2
whs
Microsoft MVP

Vista, Windows7, Mint Mate, Zorin, Windows 8
 
 

Go to Control Panel\Hardware and Sound\Devices and Printers > Add a Printer > Add a network, wireless or Bluetooth printer
My System SpecsSystem Spec
21 Feb 2010   #3

Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)
 
 

rundll32 printui.dll,PrintUIEntry is the correct command

or you can use the command line util:

PRINTUI
My System SpecsSystem Spec
.


22 Feb 2010   #4
Dom

Windows Seven Ultimate
 
 

To install my wireless printer I did what whs suggested. But first you need to install the stuff on the cd that came with your printer. Follow on-screen instructions once you've loaded up the cd.
My System SpecsSystem Spec
22 Feb 2010   #5

Windows 7 Ultimate N 64-bit
 
 

why dont u add a network printer like u usually do in windows? just add a local printer on the port tcp/ip and add in your IP.
My System SpecsSystem Spec
22 Feb 2010   #6

Windows 7
 
 

Quote   Quote: Originally Posted by richyrichuk View Post
why dont u add a network printer like u usually do in windows? just add a local printer on the port tcp/ip and add in your IP.
Because we set up alot of printers everyday. We usually have to setup 2 or more printers for each PC & say there are 20 + PCs at one store. Then we have to go thru that process 40+ times. I created a little java web applet that allows you to just type in the printer name & the IP address & hit install. This will save us alot of time. This applet works fine in Windows XP. But, not in Windows 7.

printersetup.tk

After doing some research I think you have to add the port to the registry in Windows 7 before you can install a TCP I/P printer from command line. I tried this command but still comes up as "Unknown Port"

Code:
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\HPprinter" /v HostName /t REG_SZ /d HPprinter
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\HPprinter" /v HWAddress /t REG_SZ
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\HPprinter" /v IPAddress /t REG_SZ /d 172.20.100.150
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\HPprinter" /v PortNumber /t REG_DWORD /d 9100
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\HPprinter" /v Protocol /t REG_DWORD /d 1
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\HPprinter" /v Version /t REG_DWORD /d 1
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\HPprinter" /v "SNMP Community" /t REG_SZ /d public
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\HPprinter" /v "SNMP Enabled" /t REG_DWORD /d 1
REG ADD"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\HPprinter" /v "SNMP Index" /t REG_DWORD /d 1
rundll32 printui.dll,PrintUIEntry /if /b "HPprinter" /f "c:\WINDOWS\inf\ntprint.inf" /r "HPprinter" /m "HP LaserJet 4100 Series PCL6"
My System SpecsSystem Spec
22 Feb 2010   #7

Windows 7
 
 

Really no one has any idea how to setup a tcp / ip printer in windows 7 from command line?
My System SpecsSystem Spec
22 Feb 2010   #8

win 7 ultimate32bit, Win8.1pro wmc 32bit
 
 

Quote   Quote: Originally Posted by IYIaster View Post
Really no one has any idea how to setup a tcp / ip printer in windows 7 from command line?
found this, there is a little bit of info for Windows 7,it may or maynot be of use Command Line Printer Control
My System SpecsSystem Spec
22 Feb 2010   #9

Windows 7
 
 

Quote   Quote: Originally Posted by pebbly View Post
Quote   Quote: Originally Posted by IYIaster View Post
Really no one has any idea how to setup a tcp / ip printer in windows 7 from command line?
found this, there is a little bit of info for Windows 7,it may or maynot be of use Command Line Printer Control
Yes I've been to that page. The scripts on there all tell me the same thing. Thanks for the help though. I know this can be done I just wish I knew how.
My System SpecsSystem Spec
22 Feb 2010   #10

Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)
 
 

Quote   Quote: Originally Posted by pebbly View Post
Quote   Quote: Originally Posted by IYIaster View Post
Really no one has any idea how to setup a tcp / ip printer in windows 7 from command line?
found this, there is a little bit of info for Windows 7,it may or maynot be of use Command Line Printer Control
Yep that page is confusing, but it does work, however it is a lot more work to use those commands then it is to just add the printer through the GUI.
My System SpecsSystem Spec
Reply

 Setting up network printer in Windows 7




Thread Tools




Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 10:02 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33