Remotely adding printer with batch file ; 0x32 This operation is not supported

2

I am trying to add a network printer via batch file, provided I feed the data(Printer IP, Printer Name, Computer IP) into the entries.

rundll32 printui.dll,PrintUIEntry /if /b "KONICA MINOLTA C451 PS(P)" /c\\%computerNameIP% /h "x86" /f %windir%\inf\prnkm002.inf /r "IP_%computerNameIP%" /m "KONICA MINOLTA C451 PS(P)" /n\\%computerNameIP%\%printerName%   /F %windir%\inf\prnkm002.inf

Now, once this command is completed, I receive the following error:

Operation could not be completed(error 0x00000032). This operation is not supported.

I ran a similar code with runs the GUI:

rundll32 printui.dll,PrintUIEntry /il /b "KONICA MINOLTA C451 PS(P)" /c\\%computerNameIP% /h "x86" /f %windir%\inf\prnkm002.inf /r "IP_%computerNameIP%" /m "KONICA MINOLTA C451 PS(P)" /n\\%computerNameIP% \%printerName%   /F %windir%\inf\prnkm002.inf

and I have to choose a local local Printer: which I adjust to be TCP/IP and the drivers come default since I set it. After choosing my driver, I receive the error as well.

I just can't pinpoint what exactly isn't supported.

Windows 7 32-bit. I made adjustments to the registry, print management, group policy, but none of those seem concrete to what is preventing a remote add to a network printer.

windows
batch-file
command-line
printing
rundll32
asked on Stack Overflow Oct 4, 2016 by Matt Pielichowski • edited Oct 4, 2016 by Matt Pielichowski

1 Answer

0

I found another way to do it with the prncnfg.vbs files. First create the port, assign it, then manage it.

This is all located in the admin scripts in Windows folder

answered on Stack Overflow Oct 8, 2016 by Matt Pielichowski

User contributions licensed under CC BY-SA 3.0