/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


Add a print driver in Win 10 using a batch file please

12/27/2016 3854 views

I have 5 Konica Minolta Printer drivers that I have to manually install with each machine I set up - would love to create a batch file for this - can anyone assist?


Currently - my process is to open Devices & Printers, select a printer icon, click the Print Server Properties, select the Drivers Tab, Click Add, Click Next, Click Next, click Have Disk, click Browse, browse to my thumbdrive where I have the .inf files and select the one I want.  (only lets me do ONE at a time!!!) click on Next, then click on Finish, and repeat 4 more times.... ugh!


would so love to automate this with a simple batch file!!! (I have to use batch files as opposed to vbscript or other scripting due to the boss not allowing the others, I have many batch files to do other automation... but this one has me stumped.)

I saw some postings about doing this in Win xp and 7 - but am unsure exactly what the code is doing so I thought if I provided enough info someone could actually write the code that would work rather than me hosing the print driver file on a new system...


So one of the file locations for my drivers is e:\Tools\PrinterFix\K363\KOFZ8A1_.inf


any assistance will be greatly appreciated!

Sophie

0 Comments   [ + ] Show comments

Comments


All Answers

0
Somewhere, in the Windows SDK, there is a collection of VBSes for handling printers, ports, etc. e.g. PRNMNGR.VBS and PRNPORT.VBS. Grab those. They take command line arguments which are all documented within the code itself, plus they have a help 'page' which is displayed if you run them with no arguments.
Answered 01/03/2017 by: VBScab
Red Belt

0
...and PRNDRVR.VBS for driver installation. All of these VBScripts are based on WMI queries so you could google if there are relevant WMIC commands/arguments for BAT usage.

As an alternative you can call PNPUTIL.EXE (part of the Win7 OS) or download DPINT.EXE (part of the Windows Driver Kit) for the INF drivers installation.

Also you can try with rundll32.exe PRINTUI.DLL,PrintUIEntry with appropriate parameters. This command allows to install drivers and printers.

Good luck.
Answered 01/03/2017 by: rad33k
Fourth Degree Brown Belt

0
>All of these VBScripts are based on WMI queries so you could google if there are relevant WMIC commands/arguments for BAT usage.
The VBSes already do all the work so why advise reinventing the wheel? Bizarre...
Answered 01/04/2017 by: VBScab
Red Belt

  • I refer to the autor's needs:

    "...would so love to automate this with a simple batch file!!! (I have to use batch files as opposed to vbscript or other scripting due to the boss not allowing the others, I have many batch files to do other automation... but this one has me stumped.)"
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ