• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Printer Deployment does not install driver but port

    Scheduled Pinned Locked Moved Solved
    Windows Problems
    6
    22
    8.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Tom ElliottT
      Tom Elliott @x23piracy
      last edited by

      @x23piracy I have to be honest, that video is from 0.12 version of FOG and probably the same version of the client from between all of them. The new client is New and it’s labelled as such for a very specific reason.

      @jbob wrote the new client more or less from scratch. He also built the printer manager helper that he linked which will tell you EXACTLY what to place for the printer definition. Why not just take it for a spin? We’re not telling you information to spin you on your head, rather to help you get to the tasking you needed to reach.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 2
      • Wayne WorkmanW
        Wayne Workman @x23piracy
        last edited by

        @x23piracy It might be worth noting here that if you want the printer to use specific drivers, install it manually using the drivers you want, and THEN run the printer manager helper.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
        Daily Clean Installation Results:
        https://fogtesting.fogproject.us/
        FOG Reporting:
        https://fog-external-reporting-results.fogproject.us/

        1 Reply Last reply Reply Quote 0
        • x23piracyX
          x23piracy
          last edited by

          Hey guys,

          don’ get me wrong. Okay i reexplain it:

          First of all i have used the Printer Helper binary.
          Next thing Windows 10 has an embedded driver for the HP M401 and i have a downloaded one.

          My first attempt was to use the downloaded driver on a network share readable by everyone. This Method seems to fail because the port will be created but printer driver is not installed.

          Then i tried the embedded one and i have the same issue port is there but printer itself not.
          I have used exactly the information given the printer helper program.

          Can maybe someone of you test this with a windows 10 machine?

          This i what printer helper shows me when using the embedded driver:
          alt text

          This i what printer helper shows me when using the downloaded driver vom hp:
          alt text

          @Tom Elliot FYI i am now on trunk 7645

          Regards X23

          ║▌║█║▌│║▌║▌█

          Tom ElliottT 1 Reply Last reply Reply Quote 0
          • Tom ElliottT
            Tom Elliott @x23piracy
            last edited by

            @x23piracy after you see the port is created, if you reboot the machine does the printer show up in the list?

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            x23piracyX 1 Reply Last reply Reply Quote 0
            • x23piracyX
              x23piracy @Tom Elliott
              last edited by

              @Tom-Elliott afai remember no. but i think there is additionally another problem since i am on latest trunk with client 10.6, have a look: https://forums.fogproject.org/topic/7413/fog-client-0-10-6-error-object-reference-not-set-to-an-instance-of-an-object/12

              ║▌║█║▌│║▌║▌█

              1 Reply Last reply Reply Quote 0
              • Scott BS
                Scott B
                last edited by

                In the past when I have had this issue its always been the path to the driver was wrong or the driver itself was corrupt or not added correctly. Are you able to manually make a port and install a printer using all the information in the FOG configuration of the printer?

                x23piracyX 1 Reply Last reply Reply Quote 0
                • x23piracyX
                  x23piracy @Scott B
                  last edited by

                  @Scott-B how to do this steps manually, what is the client doing? is it using the ms vbs scripts for this?

                  Regards X23

                  ║▌║█║▌│║▌║▌█

                  Scott BS JJ FullmerJ 2 Replies Last reply Reply Quote 0
                  • Scott BS
                    Scott B @x23piracy
                    last edited by

                    @x23piracy Just use the windows new printer install wizard and copy paste each value you have in fog into the wizard.

                    1 Reply Last reply Reply Quote 0
                    • JJ FullmerJ
                      JJ Fullmer Testers @x23piracy
                      last edited by

                      @x23piracy It uses the printUI.DLL

                      The code looks like PrintUI($"/if /q /b \"{printer.Name}\" /f \"{printer.File}\" /r \"{printer.Port}\" /m \"{printer.Model}\"")
                      The command line to try it yourself manually looks like RUNDLL32 PRINTUI.DLL,PrintUIEntry /if /q /b "Printer Name" /f "path\ot\inf" /r "Printer Port Name" /m "Printer Model referenced in INF" You may want to take out the /q so you get error messages.

                      Personally I use the following script template for each of my network printers on my base image and then remove them and use the C:\Windows\INF\oem#.inf file that gets created for each printer. You just have to watch and document which oem#.inf the pnputil adds the driver too.

                      ::-----------------------------------------------------------------------------
                      :: Script Name: InstallPrinters
                      :: Original Author: jfullmer
                      :: Created Date: 2016-02-18 16:39:19
                      :: Last Updated Date: 2016-03-16 10:01:27
                      :: Update Author: jfullmer
                      :: Version: 2.0
                      ::-----------------------------------------------------------------------------
                      
                      @ECHO off
                      
                      call :main
                      exit
                      
                      :main
                      	REM Function to call other functions and run the installation process
                      
                      	call :setVars
                      	call :funcHead "Welcome to the Printer installer!"
                      	REM inputs: 1 - Printer Port Name, 2 - printer ip or hostname 3- driverPath 4 - printer name 5 - printer model 6 - config file 7 - raw or lpr
                      
                      	call :installPrinter %portName% %hostname% "%inf%" "%printerName%" "%printerModel%" "%config%" %portType%
                      
                      	EXIT /B
                      
                      :setVars
                      	REM function for setting script variables, typically for directories
                      
                      	:: Set input names in the set commands, should be easier this way
                      	:: Avoid using quotes in variable definitions, enclose the calls to variables in quotes instead
                      	call :funcHead "Setting script variables"
                      	set share=\\path\to\drivers\share
                      	set portName=
                      	set hostname=
                      	set inf=%share%\
                      	set printerName=
                      	set printerModel=
                      	set config=%share%\
                      	set portType=raw
                      	
                      	echo. mounting share...
                      	net use "%share%"
                      	
                      	echo. done!
                      
                      	EXIT /B
                      
                      :installPrinter
                      	REM Function to add a new Printer
                      	REM inputs: 1 - Printer Port Name, 2 - printer ip or hostname 3- driverPath 4 - printer name 5 - printer model 6 - config file 7 - raw or lpr
                      
                      	call :funcHead "Installing Printer %~4"
                      
                      	call :printerPort %~1 %~2 %~7
                      	call :printerDriver "%~3"
                      	call :addPrinter "%~4" "%~5" %~1
                      	call :configPrinter "%~6" "%~4"
                      
                      	echo. done installing printer %~4!
                      
                      	EXIT /B
                      
                      :printerPort
                      	REM function for adding a printer port
                      	REM var inputs 1 - port name 2 -hostname or ip address 3 -port type (raw or lpr)
                      
                      	call :dots
                      	echo. Creating the printer port...
                      	
                      	IF %~3==lpr (
                      		Cscript %WINDIR%\System32\Printing_Admin_Scripts\en-US\Prnport.vbs -a -r %~1 -h %~2 -o lpr -q lp -n 515
                      	) ELSE ( REM raw
                      		Cscript %WINDIR%\System32\Printing_Admin_Scripts\en-US\Prnport.vbs -a -r %~1 -h %~2 -o raw -n 9100 
                      	) 
                      	
                      	echo. done!
                      	call :dots
                      
                      	EXIT /B
                      
                      :printerDriver
                      	REM function to add the driver input 1=full driver path
                      
                      	call :dots
                      	
                      	echo. Adding printer driver...
                      	PNPUTIL -i -a "%~1"
                      	echo. done!
                      	
                      	call :dots
                      
                      	EXIT /B
                      
                      :addPrinter
                      	REM add the printer to the created port
                      	REM 1 - printer name 2 - printer model associated with driver 3 - port name
                      	
                      	call :dots
                      	
                      	echo. adding printer to network port...
                      	Cscript %WINDIR%\System32\Printing_Admin_Scripts\en-US\Prnmngr.vbs -a -p "%~1" -m "%~2" -r %~3
                      	echo. done!
                      	
                      	call :dots
                      
                      	EXIT /B
                      
                      :configPrinter
                      	REM add any special printer configurations
                      	REM 1 - config file path 2 - printer name
                      
                      	call :dots
                      	
                      	echo. Configuring Printer...
                      	REM To create a config file for a printer, use the following syntax
                      	REM RUNDLL32 PRINTUI.DLL,PrintUIEntry /Ss /nPrinterName /a ConfigFilePath.dat m f g p
                      	RUNDLL32 PRINTUI.DLL,PrintUIEntry /Sr /n"%~2" /a %~1 m f g p
                      	echo. done!
                      	
                      	call :dots
                      
                      	EXIT /B
                      
                      :dots
                      	REM just echoing dots in a Function instead of copy pasting them so that it's consistent
                      	echo ......................................................................
                      	EXIT /B
                      
                      :funcHead
                      	REM A simple function for displaying a consistent header at the start of functions
                      	call :dots
                      	echo. %~1
                      	call :dots
                      	EXIT /B
                      

                      Also, it sounds like this is an HP printer. I’ve had some good luck using the HP universal print driver.
                      Within the hp universal print driver files, the inf you need is something along the lines of hpcu180u.inf With a model name of “HP Universal Printing PCL 6”(The numbers slightly change with each version of the UPD, but that’s the general structure of the file that works) But you will need all the other files from the driver in the original directory structure. In other words, you can’t just copy the inf file to the share because it will look for more files that are referenced. This is probably also the case for the model specific print driver, so if you are only putting the inf in the share, that could also be the problem.

                      I hope that helps

                      Have you tried the FogApi powershell module? It's pretty cool IMHO
                      https://github.com/darksidemilk/FogApi
                      https://fogapi.readthedocs.io/en/latest/
                      https://www.powershellgallery.com/packages/FogApi
                      https://forums.fogproject.org/topic/12026/powershell-api-module

                      1 Reply Last reply Reply Quote 0
                      • x23piracyX
                        x23piracy
                        last edited by x23piracy

                        Solved
                        https://forums.fogproject.org/topic/7441/fog-7645-and-client-10-6-printers-and-snapins-not-working/7

                        ║▌║█║▌│║▌║▌█

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 2 / 2
                        • First post
                          Last post

                        240

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project