none
Install local printer Windows 7

    Question

  • Hi

    Anyone know of a way to install printers locally on worgroup computers. (Cant install the printer from printserver) I have looked on some vbscript, but seems that they wont run on windows vista or windows 7. I Think powershell is the way to go, but have not found powershell script to do this.

    Regards
    Trond Erik

    Thursday, December 17, 2009 5:20 PM

Answers

  • Hi have just tested the command and got it to install. If you have a network printer that you need to specify the ports you need to use registry to define this.
    I used this regkey:

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\<put your ip here>]
    "Protocol"=dword:00000002
    "Version"=dword:00000002
    "HostName"="<put your ip here>"
    "IPAddress"=""
    "HWAddress"=""
    "PortNumber"=dword:00000203
    "SNMP Community"="public"
    "SNMP Enabled"=dword:00000000
    "SNMP Index"=dword:00000001
    "PortMonMibPortIndex"=dword:00000000
    "Queue"="lp"
    "Double Spool"=dword:00000000

    The name of the printer is set in the command:

    rundll32 printui.dll,PrintUIEntry /if /b "SHARP AR-C170M" /f "c:\drivers\\ARC170_C172_pcl5_2kxp_ver_214b05a_eng\2kxp\sb2fjenu.inf" /r "<put your ip here>" /m "SHARP AR-C170M PCL5c"

    • Marked as answer by TrondErik Friday, December 18, 2009 7:48 AM
    Friday, December 18, 2009 7:48 AM

All replies

  • Try this as a cmd file:
    rundll32.exe printui.dll,PrintUIEntry /ia /m "HP LaserJet 4050" /h "Intel" /v "Windows 7" /f "path\file.inf"

    Parameter /m is just the model or name of the printer, /h is the architecture, /v version and /f is path and name of inf-file.

    This command installs the driver, so that when you plug in your printer the driver will load. There are many other uses for this command using other parameters. Just use your favorite search engine :)
    • Proposed as answer by Eirik Hamer Saturday, December 19, 2009 10:15 PM
    Thursday, December 17, 2009 9:01 PM
  • Hi

    Thanks. Does this apply to network printers also?
    Ill look into the command and se if i can find parameters to set ip and port

    -Trond Erik
    Friday, December 18, 2009 7:03 AM
  • Hi have just tested the command and got it to install. If you have a network printer that you need to specify the ports you need to use registry to define this.
    I used this regkey:

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\<put your ip here>]
    "Protocol"=dword:00000002
    "Version"=dword:00000002
    "HostName"="<put your ip here>"
    "IPAddress"=""
    "HWAddress"=""
    "PortNumber"=dword:00000203
    "SNMP Community"="public"
    "SNMP Enabled"=dword:00000000
    "SNMP Index"=dword:00000001
    "PortMonMibPortIndex"=dword:00000000
    "Queue"="lp"
    "Double Spool"=dword:00000000

    The name of the printer is set in the command:

    rundll32 printui.dll,PrintUIEntry /if /b "SHARP AR-C170M" /f "c:\drivers\\ARC170_C172_pcl5_2kxp_ver_214b05a_eng\2kxp\sb2fjenu.inf" /r "<put your ip here>" /m "SHARP AR-C170M PCL5c"

    • Marked as answer by TrondErik Friday, December 18, 2009 7:48 AM
    Friday, December 18, 2009 7:48 AM
  • Just wanted to add that windows comes with finnished scripts to create the tcp/ip port. This is located in the directory: C:\Windows\System32\Printing_Admin_Scripts\en-US\prnport.vbs

    Take a look at this website for more information:
    http://technet.microsoft.com/en-us/library/cc754352(WS.10).aspx

    Friday, December 18, 2009 1:07 PM
  • this post was a tremendous resource for us to script Windows 7 printers for workgroup stations. This allowed us to script installations company wide.  Hope this helps someone...

    *************Create TCP/IP Port:

    cscript c:\Windows\System32\Printing_Admin_Scripts\en-US\prnport.vbs -a -r IP_192.168.2.23 -h 192.168.2.23 -o raw -n 9100



    *******Add printer/driver and connect to port made above:

    net use \\192.168.10.22\PrinterShare print /USER:pscript

    rundll32 printui.dll,PrintUIEntry /if /u /b "KONICA Black & White (Port Richey)" /f "\\192.168.10.22\PrinterShare\C652_Series_PS_PCL_FAX_v3.6.0.0\Driver\Drivers\PCL\EN\Win_x64\KOAZCJ__.INF" /r "IP_192.168.2.23" /m "KONICA MINOLTA C652SeriesPCL"

    rundll32 printui.dll,PrintUIEntry /if /u /b "KONICA Color (Port Richey)" /f "\\192.168.10.22\PrinterShare\C652_Series_PS_PCL_FAX_v3.6.0.0\Driver\Drivers\PCL\EN\Win_x64\KOAZCJ__.INF" /r "IP_192.168.2.23" /m "KONICA MINOLTA C652SeriesPCL"

    ***********Import settings

    rundll32 printui.dll,PrintUIEntry /Sr /n "KONICA Black & White (Port Richey)" /a "\\192.168.10.22\PrinterShare\Konica_Windows7Pro_x64\KonicaBW_WINPro_x64.dat" r c g u d

    rundll32 printui.dll,PrintUIEntry /Sr /n "KONICA Color (Port Richey)" /a "\\192.168.10.22\PrinterShare\Konica_Windows7Pro_x64\KonicaColor_WINPro_x64.dat" r c g u d 

    Saturday, November 03, 2012 4:55 AM
  • this post was a tremendous resource for us to script Windows 7 printers for workgroup stations. This allowed us to script installations company wide.  Hope this helps someone...

    *************Create TCP/IP Port:

    cscript c:\Windows\System32\Printing_Admin_Scripts\en-US\prnport.vbs -a -r IP_192.168.2.23 -h 192.168.2.23 -o raw -n 9100



    *******Add printer/driver and connect to port made above:

    net use \\192.168.10.22\PrinterShare print /USER:pscript

    rundll32 printui.dll,PrintUIEntry /if /u /b "KONICA Black & White (Port Richey)" /f "\\192.168.10.22\PrinterShare\C652_Series_PS_PCL_FAX_v3.6.0.0\Driver\Drivers\PCL\EN\Win_x64\KOAZCJ__.INF" /r "IP_192.168.2.23" /m "KONICA MINOLTA C652SeriesPCL"

    rundll32 printui.dll,PrintUIEntry /if /u /b "KONICA Color (Port Richey)" /f "\\192.168.10.22\PrinterShare\C652_Series_PS_PCL_FAX_v3.6.0.0\Driver\Drivers\PCL\EN\Win_x64\KOAZCJ__.INF" /r "IP_192.168.2.23" /m "KONICA MINOLTA C652SeriesPCL"

    ***********Import settings

    rundll32 printui.dll,PrintUIEntry /Sr /n "KONICA Black & White (Port Richey)" /a "\\192.168.10.22\PrinterShare\Konica_Windows7Pro_x64\KonicaBW_WINPro_x64.dat" r c g u d

    rundll32 printui.dll,PrintUIEntry /Sr /n "KONICA Color (Port Richey)" /a "\\192.168.10.22\PrinterShare\Konica_Windows7Pro_x64\KonicaColor_WINPro_x64.dat" r c g u d 

    what does this option mean net use \\192.168.10.22\PrinterShare print /USER:pscript
    for example i put \\192.168.0.10\? what the another path i should put ?

    My printer ip address is 192.168.10.22 but my inf path is at different location so what can i do about it ? can assist me on this portion?

    Saturday, July 27, 2013 1:10 AM