0
@echo off
REM --------------------------------------------------------KC 122 MFP

echo Installing KC 122 MFP
cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\Prnport.vbs -a -r IP_192.168.100.20 -h 192.168.100.20 -o raw -n 9100
rundll32 printui.dll,PrintUIEntry /ia /m "KONICA MINOLTA Universal PCL" /f "\\Server\Printer Drivers\Konica-Minolta\350-250-200-MFP\Win_x64\KOB__J__.inf"
rundll32 printui.dll,PrintUIEntry /if /b "KC 122 MFP" /f "\\Server\Printer Drivers\Konica-Minolta\350-250-200-MFP\Win_x64\KOB__J__.inf" /r "IP_192.168.100.20" /m "KONICA MINOLTA Universal PCL"
RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "KC 122 MFP" 192.168.100.20
Pause

The above works but won't specify a default port. I have to do it manually. I'm trying to script it but can't seem to get it to work.

I have tried several variations of the folowing:

cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\Prnmngr.vbs -p "KC 122 MFP" -r

It only returns the Arguments and Examples...

I tried uttering the magical phrase "Printicus Installio"...that also failed.

  • `PRNCNFG.vbs` configure a printer. – JosefZ Dec 08 '14 at 16:40
  • `cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\Prncnfg.vbs -p "KC 122 MFP" -r IP_192.168.100.20` Thanks JosefZ, the above code still only gives me the Arguments and Examples as if I entered the command wrong. I must be missing something. I'm only trying to specify the port name and/or IP for printer KC 122 MFP. Any ideas? – Timothy Matthews Dec 10 '14 at 14:27
  • Add `-t` argument of meaning _set configuration_ as follows: `... prncnfg.vbs -t -p "KC 122 MFP" -r IP_192.168.100.20`. For more info try `... prncnfg.vbs -?` or `/?`, or read the script in a [good text and code editor](http://www.pspad.com/en/) – JosefZ Dec 10 '14 at 19:20
  • That was it! Thanks JosefZ! How do I mark this as answered? – Timothy Matthews Dec 17 '14 at 15:01

1 Answers1

0

prncnfg.vbs - printer configuration script for WMI on Whistler (i.e. Microsoft code name for Windows XP) used to get and set printer configuration also used to rename a printer. Usage (not complete):

[cscript] [path\]prncnfg[.vbs] { -g | -t | -x | -? } ...

or

[cscript] [path\]prncnfg[.vbs] { /g | /t | /x | /? } ...

Main switches:

  • -g Display configuration information about a printer
  • -t Configure a printer
  • -x Change the name of a printer
  • /? (optional) Usage hints

Your task should be accomplished by (path to script omitted):

cscript prncnfg.vbs -t -p "KC 122 MFP" -r IP_192.168.100.20
JosefZ
  • 28,460
  • 5
  • 44
  • 83