12 Replies Latest reply on Jun 1, 2012 7:38 AM by techsupportguru

    Installing print driver (.inf)


      I would like to be able to use LANDesk to install a print driver on a remote machine. I have the .inf file, but I need to repackage it into an .exe or .msi. I have limited scripting ability and I was wondering if anyone knew of a resource that would help me prepare a script to assist with my project. I'm not even sure if a script is even necesarry to get this project done. How do I go about repackaging my .inf file?

        • 1. Re: Installing print driver (.inf)

          If you are just copying one .inf file you could create a File Transfer Script.


          If we have several files associated with a print driver, we compress the files into a .zip folder and use the 7zip command line executable (7za.exe) with switches to extract to a location on the local computer.



          New EXE distribution package

          Primary File = 7za.exe

          Install options = Command line switches and location to extract

          Additional Files = zip folder with drivers


          hope this helps.

          1 of 1 people found this helpful
          • 2. Re: Installing print driver (.inf)

            Thanks for the reply. I'm just starting to get into deploying software remotely overall and I think I need someone to show me how repackaging works. Are there any videos I can watch that would help me repackage drivers, etc.? The whole process seems to be overwhealming me. I still don't know where to start.


            Your instructions seem really simple at first glance, but for someone who has never done the process before it is confusing. I wish there was a step by step process somewhere that I could reference.

            • 3. Re: Installing print driver (.inf)

              The best place to get started with software deployment is the landing page:



              It has several videos to help you get going with the basics of deploying software.


              Which version of LANDesk are you using?


              If you are just trying to copy .inf files you don't have to repackage them as an .exe or .msi to be able to copy them.


              Are you wanting LANDesk to install the printer? or just have the drivers available on the local computer?

              • 4. Re: Installing print driver (.inf)

                I want LANDesk to install an available network printer.

                • 5. Re: Installing print driver (.inf)

                  I did not know anything about scripting before LANDesk but have at least learned how to use batch files which has helped a lot in distributing software. I install printers using batch files through Software Distribution. If you only have the one inf file, you can create a batch distribution package with the inf file as an additional file. I have attached two example batch files that I use to install a printer.


                  If you ever have more than 5-10 files to include (depending on size) I recommend creating an archive, as Wade mentioned. The design and speed of LANDesk to check the hash of every file is horrible. I have a 10MB folder with 50 files that takes 20min just to download. For some printers I keep the entire driver folder so I create a SFX archive for the drivers with 7-zip (7-zip SFX Maker for larger archives- great application).


                  The Software Distribution Landing page would be a good place to start. There are videos available if your account has access. If the videos tell you that you don't have access, check with your LD rep.



                  The LD manual and Help within the console are great resources. I find most companies' help feature in the applications to be completely useless but LD does a great job with this documentation.

                  • 6. Re: Installing print driver (.inf)

                    This is a good page to start learning how to use the prnport.vbs script in Windows 7



                    It's not a trivial task but with some testing and Google magic you can create the batch files you need. Our scripts are a bit different than Sundiata's, but they all acomplish the same goal.



                    @echo on


                    set printername="Set Printer name in Printer List"

                    set drivername="Printer name as listed in driver"

                    set address="IP Address"

                    set infpath=C:\driverlocation\driver.inf


                    cscript %systemroot%\system32\Printing_Admin_Scripts\en-us\prnport.vbs -a -h %address% -r IP_%address% -o raw -n 9100



                    rundll32 printui.dll,PrintUIEntry /if /b %printername% /f %infpath% /r IP_%address% /m %drivername%


                    I set a prerequisite for the batch script to run the driver copy task.

                    • 7. Re: Installing print driver (.inf)

                      Wade -


                      Will you please help me understand what is going on in the 8th line of your script? Why are there 2 separate address entries?


                      Also, would I keep the "%" throughout the script?

                      • 8. Re: Installing print driver (.inf)

                        Yes you want to keep the %


                        The % indicates a variable that were set in the first part of the script



                        The %address% and IP_%address% are there to create the printer port. The IP_%address% indicates the port name and the %address% provides the hostname or IP address.


                        If you were to manually add the ip port to a computer you would see the IP entered twice. As in the image below.


                        • 9. Re: Installing print driver (.inf)

                          I'm receiving an error. See the attached picture. What's going on here?



                          • 10. Re: Installing print driver (.inf)

                            I would change your address variable from "4009k.son4.ptr.vcu.edu" to the actual IP address ex. =

                            • 11. Re: Installing print driver (.inf)

                              These pages may help you as well.






                              It's going to take some testing and configuring for your environment. Make sure to get the scripts working locally before trying to deploy them with LANDesk.

                              • 12. Re: Installing print driver (.inf)

                                I want to use the following script:


                                strComputer = "."

                                Set objWMIService = GetObject("winmgmts:" _

                                    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")


                                Set objNewPort = objWMIService.Get _



                                objNewPort.Name = "IP_10.10.10.113"

                                objNewPort.Protocol = 1

                                objNewPort.HostAddress = ""

                                objNewPort.PortNumber = "9100"

                                objNewPort.SNMPEnabled = False



                                Set objPrinter = objWMIService.Get("Win32_Printer").SpawnInstance_


                                objPrinter.DriverName = "HP LaserJet 4000 Series PS"

                                objPrinter.PortName   = "IP_10.10.10.113"

                                objPrinter.DeviceID   = "FrontOffice"

                                objPrinter.Network = True



                                What do I need to add to specify the location of my .inf file?